From 6bac0412eb05e161fab0aa2fa1817d95f7d01b6c Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Thu, 7 Mar 2024 23:13:04 +0800 Subject: [PATCH] fix: v0.5.1 issues (#4844) * chore: improve clear cache hint text * fix: remove color tab in image picker --- .../presentation/setting/support_setting_group.dart | 8 +++++++- .../editor_plugins/image/image_placeholder.dart | 7 +++++++ frontend/resources/translations/en.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/setting/support_setting_group.dart b/frontend/appflowy_flutter/lib/mobile/presentation/setting/support_setting_group.dart index 1fd3fed7a6..5222a05b8f 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/setting/support_setting_group.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/setting/support_setting_group.dart @@ -7,6 +7,7 @@ import 'package:appflowy/mobile/presentation/widgets/widgets.dart'; import 'package:appflowy/shared/appflowy_cache_manager.dart'; import 'package:appflowy/startup/startup.dart'; import 'package:appflowy/util/share_log_files.dart'; +import 'package:appflowy/workspace/presentation/home/toast.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flutter/material.dart'; @@ -71,9 +72,14 @@ class SupportSettingGroup extends StatelessWidget { maxLines: 4, ), actionButtonTitle: LocaleKeys.button_yes.tr(), - actionButtonColor: Theme.of(context).colorScheme.error, onActionButtonPressed: () async { await getIt().clearAllCache(); + if (context.mounted) { + showSnackBarMessage( + context, + LocaleKeys.settings_files_clearCacheSuccess.tr(), + ); + } }, ); }, diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart index 8b1a1237e1..f193f91617 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/image_placeholder.dart @@ -86,6 +86,13 @@ class ImagePlaceholderState extends State { popupBuilder: (context) { return UploadImageMenu( limitMaximumImageSize: !_isLocalMode(), + supportTypes: const [ + UploadImageType.local, + UploadImageType.url, + UploadImageType.unsplash, + UploadImageType.openAI, + UploadImageType.stabilityAI, + ], onSelectedLocalImage: (path) { controller.close(); WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { diff --git a/frontend/resources/translations/en.json b/frontend/resources/translations/en.json index ad5797d081..574aa0f291 100644 --- a/frontend/resources/translations/en.json +++ b/frontend/resources/translations/en.json @@ -463,7 +463,7 @@ "exportFileFail": "Export file failed!", "export": "Export", "clearCache": "Clear cache", - "clearCacheDesc": "Clear the cache including the images, fonts, and other temporary files. This will not delete your data.", + "clearCacheDesc": "If you encounter issues with images not loading or fonts not displaying correctly, try clearing your cache. This action will not remove your user data.", "areYouSureToClearCache": "Are you sure to clear the cache?", "clearCacheSuccess": "Cache cleared successfully!" },