chore: toast message when theme folder doesn't have permission (#7715)

This commit is contained in:
Richard Shiue 2025-04-09 13:45:07 +08:00 committed by GitHub
parent 8b82d532e0
commit ad227bcf79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
52 changed files with 36 additions and 122 deletions

View File

@ -133,7 +133,6 @@ Future<bool> _afLaunchLocalUri(
}; };
if (context != null && context.mounted) { if (context != null && context.mounted) {
showToastNotification( showToastNotification(
context,
message: message, message: message,
type: result.type == ResultType.done type: result.type == ResultType.done
? ToastificationType.success ? ToastificationType.success

View File

@ -336,7 +336,6 @@ class _MobileViewPageState extends State<MobileViewPage> {
listener: (context, state) { listener: (context, state) {
if (state.isLocked) { if (state.isLocked) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.lockPage_pageLockedToast.tr(), message: LocaleKeys.lockPage_pageLockedToast.tr(),
); );
@ -366,7 +365,6 @@ class _MobileViewPageState extends State<MobileViewPage> {
listener: (context, state) { listener: (context, state) {
if (state.isLocked) { if (state.isLocked) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.lockPage_pageLockedToast.tr(), message: LocaleKeys.lockPage_pageLockedToast.tr(),
); );
} }

View File

@ -161,7 +161,6 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
context.pop(); context.pop();
showToastNotification( showToastNotification(
context,
message: LocaleKeys.button_duplicateSuccessfully.tr(), message: LocaleKeys.button_duplicateSuccessfully.tr(),
); );
} }
@ -170,7 +169,6 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
_toggleFavorite(context); _toggleFavorite(context);
showToastNotification( showToastNotification(
context,
message: LocaleKeys.button_favoriteSuccessfully.tr(), message: LocaleKeys.button_favoriteSuccessfully.tr(),
); );
} }
@ -179,7 +177,6 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
_toggleFavorite(context); _toggleFavorite(context);
showToastNotification( showToastNotification(
context,
message: LocaleKeys.button_unfavoriteSuccessfully.tr(), message: LocaleKeys.button_unfavoriteSuccessfully.tr(),
); );
} }
@ -202,7 +199,6 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
), ),
); );
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
} }
@ -234,12 +230,10 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
), ),
); );
showToastNotification( showToastNotification(
context,
message: LocaleKeys.shareAction_copyLinkSuccess.tr(), message: LocaleKeys.shareAction_copyLinkSuccess.tr(),
); );
} else { } else {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.shareAction_copyLinkToBlockFailed.tr(), message: LocaleKeys.shareAction_copyLinkToBlockFailed.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );
@ -323,11 +317,9 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
if (state.publishResult != null) { if (state.publishResult != null) {
state.publishResult!.fold( state.publishResult!.fold(
(value) => showToastNotification( (value) => showToastNotification(
context,
message: LocaleKeys.publish_publishSuccessfully.tr(), message: LocaleKeys.publish_publishSuccessfully.tr(),
), ),
(error) => showToastNotification( (error) => showToastNotification(
context,
message: '${LocaleKeys.publish_publishFailed.tr()}: ${error.code}', message: '${LocaleKeys.publish_publishFailed.tr()}: ${error.code}',
type: ToastificationType.error, type: ToastificationType.error,
), ),
@ -335,11 +327,9 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
} else if (state.unpublishResult != null) { } else if (state.unpublishResult != null) {
state.unpublishResult!.fold( state.unpublishResult!.fold(
(value) => showToastNotification( (value) => showToastNotification(
context,
message: LocaleKeys.publish_unpublishSuccessfully.tr(), message: LocaleKeys.publish_unpublishSuccessfully.tr(),
), ),
(error) => showToastNotification( (error) => showToastNotification(
context,
message: LocaleKeys.publish_unpublishFailed.tr(), message: LocaleKeys.publish_unpublishFailed.tr(),
description: error.msg, description: error.msg,
type: ToastificationType.error, type: ToastificationType.error,
@ -349,7 +339,6 @@ class MobileViewPageMoreBottomSheet extends StatelessWidget {
state.updatePathNameResult!.onSuccess( state.updatePathNameResult!.onSuccess(
(value) { (value) {
showToastNotification( showToastNotification(
context,
message: message:
LocaleKeys.settings_sites_success_updatePathNameSuccess.tr(), LocaleKeys.settings_sites_success_updatePathNameSuccess.tr(),
); );

View File

@ -65,7 +65,6 @@ class _MobileViewItemBottomSheetState extends State<MobileViewItemBottomSheet> {
Navigator.pop(context); Navigator.pop(context);
context.read<ViewBloc>().add(const ViewEvent.duplicate()); context.read<ViewBloc>().add(const ViewEvent.duplicate());
showToastNotification( showToastNotification(
context,
message: LocaleKeys.button_duplicateSuccessfully.tr(), message: LocaleKeys.button_duplicateSuccessfully.tr(),
); );
break; break;
@ -84,7 +83,6 @@ class _MobileViewItemBottomSheetState extends State<MobileViewItemBottomSheet> {
.read<FavoriteBloc>() .read<FavoriteBloc>()
.add(FavoriteEvent.toggle(widget.view)); .add(FavoriteEvent.toggle(widget.view));
showToastNotification( showToastNotification(
context,
message: !widget.view.isFavorite message: !widget.view.isFavorite
? LocaleKeys.button_favoriteSuccessfully.tr() ? LocaleKeys.button_favoriteSuccessfully.tr()
: LocaleKeys.button_unfavoriteSuccessfully.tr(), : LocaleKeys.button_unfavoriteSuccessfully.tr(),
@ -146,7 +144,6 @@ class _MobileViewItemBottomSheetState extends State<MobileViewItemBottomSheet> {
Navigator.pop(context); Navigator.pop(context);
showToastNotification( showToastNotification(
context,
message: LocaleKeys.sideBar_removeSuccess.tr(), message: LocaleKeys.sideBar_removeSuccess.tr(),
); );
}, },

View File

@ -45,7 +45,6 @@ enum MobilePaneActionType {
size: 24.0, size: 24.0,
onPressed: (context) { onPressed: (context) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.button_unfavoriteSuccessfully.tr(), message: LocaleKeys.button_unfavoriteSuccessfully.tr(),
); );
@ -61,7 +60,6 @@ enum MobilePaneActionType {
size: 24.0, size: 24.0,
onPressed: (context) { onPressed: (context) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.button_favoriteSuccessfully.tr(), message: LocaleKeys.button_favoriteSuccessfully.tr(),
); );

View File

@ -103,7 +103,7 @@ class _OpenRowPageButtonState extends State<OpenRowPageButton> {
Log.info('Open row page(${widget.documentId})'); Log.info('Open row page(${widget.documentId})');
if (view == null) { if (view == null) {
showToastNotification(context, message: 'Failed to open row page'); showToastNotification(message: 'Failed to open row page');
// reload the view again // reload the view again
unawaited(_preloadView(context)); unawaited(_preloadView(context));
Log.error('Failed to open row page(${widget.documentId})'); Log.error('Failed to open row page(${widget.documentId})');

View File

@ -329,7 +329,7 @@ class _HomePageState extends State<_HomePage> {
} }
if (message != null) { if (message != null) {
showToastNotification(context, message: message, type: toastType); showToastNotification(message: message, type: toastType);
} }
} }
} }

View File

@ -339,7 +339,6 @@ class _SpaceMenuItemTrailingState extends State<SpaceMenuItemTrailing> {
context.read<SpaceBloc>().add(const SpaceEvent.duplicate()); context.read<SpaceBloc>().add(const SpaceEvent.duplicate());
showToastNotification( showToastNotification(
context,
message: LocaleKeys.space_success_duplicateSpace.tr(), message: LocaleKeys.space_success_duplicateSpace.tr(),
); );
@ -374,7 +373,6 @@ class _SpaceMenuItemTrailingState extends State<SpaceMenuItemTrailing> {
.add(SpaceEvent.rename(space: widget.space, name: name)); .add(SpaceEvent.rename(space: widget.space, name: name));
showToastNotification( showToastNotification(
context,
message: LocaleKeys.space_success_renameSpace.tr(), message: LocaleKeys.space_success_renameSpace.tr(),
); );
}, },
@ -424,7 +422,6 @@ class _SpaceMenuItemTrailingState extends State<SpaceMenuItemTrailing> {
); );
showToastNotification( showToastNotification(
context,
message: LocaleKeys.space_success_updateSpace.tr(), message: LocaleKeys.space_success_updateSpace.tr(),
); );
@ -457,7 +454,6 @@ class _SpaceMenuItemTrailingState extends State<SpaceMenuItemTrailing> {
context.read<SpaceBloc>().add(SpaceEvent.delete(widget.space)); context.read<SpaceBloc>().add(SpaceEvent.delete(widget.space));
showToastNotification( showToastNotification(
context,
message: LocaleKeys.space_success_deleteSpace.tr(), message: LocaleKeys.space_success_deleteSpace.tr(),
); );

View File

@ -332,7 +332,6 @@ class _NotificationNavigationBar extends StatelessWidget {
} }
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.settings_notifications_markAsReadNotifications_allSuccess .settings_notifications_markAsReadNotifications_allSuccess
.tr(), .tr(),
@ -350,7 +349,6 @@ class _NotificationNavigationBar extends StatelessWidget {
} }
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_notifications_archiveNotifications_allSuccess message: LocaleKeys.settings_notifications_archiveNotifications_allSuccess
.tr(), .tr(),
); );

View File

@ -108,7 +108,6 @@ class NotificationSettingsPopupMenu extends StatelessWidget {
void _onMarkAllAsRead(BuildContext context) { void _onMarkAllAsRead(BuildContext context) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.settings_notifications_markAsReadNotifications_allSuccess .settings_notifications_markAsReadNotifications_allSuccess
.tr(), .tr(),
@ -119,7 +118,6 @@ class NotificationSettingsPopupMenu extends StatelessWidget {
void _onArchiveAll(BuildContext context) { void _onArchiveAll(BuildContext context) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_notifications_archiveNotifications_allSuccess message: LocaleKeys.settings_notifications_archiveNotifications_allSuccess
.tr(), .tr(),
); );
@ -133,7 +131,6 @@ class NotificationSettingsPopupMenu extends StatelessWidget {
} }
showToastNotification( showToastNotification(
context,
message: 'Unarchive all success (Debug Mode)', message: 'Unarchive all success (Debug Mode)',
); );

View File

@ -31,7 +31,6 @@ enum NotificationPaneActionType {
size: 24.0, size: 24.0,
onPressed: (context) { onPressed: (context) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.settings_notifications_markAsReadNotifications_success .settings_notifications_markAsReadNotifications_success
.tr(), .tr(),
@ -55,7 +54,6 @@ enum NotificationPaneActionType {
size: 24.0, size: 24.0,
onPressed: (context) { onPressed: (context) {
showToastNotification( showToastNotification(
context,
message: 'Unarchive notification success', message: 'Unarchive notification success',
); );
@ -168,7 +166,6 @@ class _NotificationMoreActions extends StatelessWidget {
Navigator.of(context).pop(); Navigator.of(context).pop();
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_notifications_markAsReadNotifications_success message: LocaleKeys.settings_notifications_markAsReadNotifications_success
.tr(), .tr(),
); );
@ -191,7 +188,6 @@ class _NotificationMoreActions extends StatelessWidget {
void _onArchive(BuildContext context) { void _onArchive(BuildContext context) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_notifications_archiveNotifications_success message: LocaleKeys.settings_notifications_archiveNotifications_success
.tr() .tr()
.tr(), .tr(),

View File

@ -74,7 +74,6 @@ class _NotificationTabState extends State<NotificationTab>
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_notifications_refreshSuccess.tr(), message: LocaleKeys.settings_notifications_refreshSuccess.tr(),
); );
} }

View File

@ -81,7 +81,6 @@ class SupportSettingGroup extends StatelessWidget {
); );
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_files_clearCacheSuccess.tr(), message: LocaleKeys.settings_files_clearCacheSuccess.tr(),
); );
} }

View File

@ -201,7 +201,6 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
result.fold( result.fold(
(s) { (s) {
showToastNotification( showToastNotification(
context,
message: message:
LocaleKeys.settings_appearance_members_addMemberSuccess.tr(), LocaleKeys.settings_appearance_members_addMemberSuccess.tr(),
bottomPadding: keyboardHeight, bottomPadding: keyboardHeight,
@ -218,7 +217,6 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
exceededLimit = f.code == ErrorCode.WorkspaceMemberLimitExceeded; exceededLimit = f.code == ErrorCode.WorkspaceMemberLimitExceeded;
}); });
showToastNotification( showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
bottomPadding: keyboardHeight, bottomPadding: keyboardHeight,
message: message, message: message,
@ -229,7 +227,6 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
result.fold( result.fold(
(s) { (s) {
showToastNotification( showToastNotification(
context,
message: message:
LocaleKeys.settings_appearance_members_inviteMemberSuccess.tr(), LocaleKeys.settings_appearance_members_inviteMemberSuccess.tr(),
bottomPadding: keyboardHeight, bottomPadding: keyboardHeight,
@ -247,7 +244,6 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
exceededLimit = f.code == ErrorCode.WorkspaceMemberLimitExceeded; exceededLimit = f.code == ErrorCode.WorkspaceMemberLimitExceeded;
}); });
showToastNotification( showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
message: message, message: message,
bottomPadding: keyboardHeight, bottomPadding: keyboardHeight,
@ -258,7 +254,6 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
result.fold( result.fold(
(s) { (s) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.settings_appearance_members_removeFromWorkspaceSuccess .settings_appearance_members_removeFromWorkspaceSuccess
.tr(), .tr(),
@ -267,7 +262,6 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
}, },
(f) { (f) {
showToastNotification( showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
message: LocaleKeys message: LocaleKeys
.settings_appearance_members_removeFromWorkspaceFailed .settings_appearance_members_removeFromWorkspaceFailed
@ -283,7 +277,6 @@ class _InviteMemberPageState extends State<_InviteMemberPage> {
final email = emailController.text; final email = emailController.text;
if (!isEmail(email)) { if (!isEmail(email)) {
return showToastNotification( return showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
message: LocaleKeys.settings_appearance_members_emailInvalidError.tr(), message: LocaleKeys.settings_appearance_members_emailInvalidError.tr(),
); );

View File

@ -184,7 +184,6 @@ class CopyButton extends StatelessWidget {
); );
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
} }

View File

@ -376,7 +376,6 @@ class ChatAIMessagePopup extends StatelessWidget {
} }
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
} }

View File

@ -14,7 +14,6 @@ import 'package:universal_platform/universal_platform.dart';
void openPageFromMessage(BuildContext context, ViewPB? view) { void openPageFromMessage(BuildContext context, ViewPB? view) {
if (view == null) { if (view == null) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.chat_openPagePreviewFailedToast.tr(), message: LocaleKeys.chat_openPagePreviewFailedToast.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );
@ -36,7 +35,6 @@ void showSaveMessageSuccessToast(BuildContext context, ViewPB? view) {
return; return;
} }
showToastNotification( showToastNotification(
context,
richMessage: TextSpan( richMessage: TextSpan(
children: [ children: [
TextSpan( TextSpan(

View File

@ -442,7 +442,6 @@ class DocumentBloc extends Bloc<DocumentEvent, DocumentState> {
final context = AppGlobals.rootNavKey.currentContext; final context = AppGlobals.rootNavKey.currentContext;
if (context != null && context.mounted) { if (context != null && context.mounted) {
showToastNotification( showToastNotification(
context,
message: 'document integrity check failed', message: 'document integrity check failed',
type: ToastificationType.error, type: ToastificationType.error,
); );

View File

@ -150,7 +150,6 @@ class _AiWriterToolbarActionListState extends State<AiWriterToolbarActionList> {
}); });
} else { } else {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_plugins_appflowyAIEditDisabled.tr(), message: LocaleKeys.document_plugins_appflowyAIEditDisabled.tr(),
); );
} }
@ -196,7 +195,6 @@ class ImproveWritingButton extends StatelessWidget {
_insertAiNode(editorState, AiWriterCommand.improveWriting); _insertAiNode(editorState, AiWriterCommand.improveWriting);
} else { } else {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_plugins_appflowyAIEditDisabled.tr(), message: LocaleKeys.document_plugins_appflowyAIEditDisabled.tr(),
); );
} }

View File

@ -47,7 +47,6 @@ class _CopyButton extends StatelessWidget {
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_codeBlock_codeCopiedSnackbar.tr(), message: LocaleKeys.document_codeBlock_codeCopiedSnackbar.tr(),
); );
} }

View File

@ -73,7 +73,6 @@ extension PasteFromImage on EditorState {
Log.info('unsupported format: $format'); Log.info('unsupported format: $format');
if (UniversalPlatform.isMobile) { if (UniversalPlatform.isMobile) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_imageBlock_error_invalidImageFormat.tr(), message: LocaleKeys.document_imageBlock_error_invalidImageFormat.tr(),
); );
} }
@ -112,7 +111,6 @@ extension PasteFromImage on EditorState {
if (errorMessage != null && context.mounted) { if (errorMessage != null && context.mounted) {
showToastNotification( showToastNotification(
context,
message: errorMessage, message: errorMessage,
); );
return false; return false;
@ -131,7 +129,6 @@ extension PasteFromImage on EditorState {
Log.error('cannot copy image file', e); Log.error('cannot copy image file', e);
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_imageBlock_error_invalidImage.tr(), message: LocaleKeys.document_imageBlock_error_invalidImage.tr(),
); );
} }

View File

@ -241,7 +241,6 @@ class _LinkHoverTriggerState extends State<LinkHoverTrigger> {
.setData(ClipboardServiceData(plainText: href)); .setData(ClipboardServiceData(plainText: href));
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.shareAction_copyLinkSuccess.tr(), message: LocaleKeys.shareAction_copyLinkSuccess.tr(),
); );
} }

View File

@ -154,7 +154,6 @@ class _ErrorBlockComponentWidgetState extends State<ErrorBlockComponentWidget>
void _copyBlockContent() { void _copyBlockContent() {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_errorBlock_blockContentHasBeenCopied.tr(), message: LocaleKeys.document_errorBlock_blockContentHasBeenCopied.tr(),
); );

View File

@ -105,7 +105,6 @@ Future<void> downloadMediaFile(
} else { } else {
if (userProfile == null) { if (userProfile == null) {
return showToastNotification( return showToastNotification(
context,
message: LocaleKeys.grid_media_downloadFailedToken.tr(), message: LocaleKeys.grid_media_downloadFailedToken.tr(),
); );
} }
@ -128,14 +127,12 @@ Future<void> downloadMediaFile(
if (result != null && context.mounted) { if (result != null && context.mounted) {
showToastNotification( showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
message: LocaleKeys.grid_media_downloadSuccess.tr(), message: LocaleKeys.grid_media_downloadSuccess.tr(),
); );
} }
} else if (context.mounted) { } else if (context.mounted) {
showToastNotification( showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
message: LocaleKeys.document_plugins_image_imageDownloadFailed.tr(), message: LocaleKeys.document_plugins_image_imageDownloadFailed.tr(),
); );
@ -159,13 +156,11 @@ Future<void> downloadMediaFile(
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.grid_media_downloadSuccess.tr(), message: LocaleKeys.grid_media_downloadSuccess.tr(),
); );
} }
} else if (context.mounted) { } else if (context.mounted) {
showToastNotification( showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
message: LocaleKeys.document_plugins_image_imageDownloadFailed.tr(), message: LocaleKeys.document_plugins_image_imageDownloadFailed.tr(),
); );

View File

@ -378,7 +378,6 @@ class CustomImageBlockComponentState extends State<CustomImageBlockComponent>
onTap: () async { onTap: () async {
context.pop(); context.pop();
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_plugins_image_copiedToPasteBoard.tr(), message: LocaleKeys.document_plugins_image_copiedToPasteBoard.tr(),
); );
await getIt<ClipboardService>().setPlainText(url); await getIt<ClipboardService>().setPlainText(url);
@ -431,7 +430,6 @@ class CustomImageBlockComponentState extends State<CustomImageBlockComponent>
); );
if (mounted) { if (mounted) {
showToastNotification( showToastNotification(
context,
message: result.isSuccess message: result.isSuccess
? LocaleKeys.document_imageBlock_successToAddImageToGallery.tr() ? LocaleKeys.document_imageBlock_successToAddImageToGallery.tr()
: LocaleKeys.document_imageBlock_failedToAddImageToGallery.tr(), : LocaleKeys.document_imageBlock_failedToAddImageToGallery.tr(),

View File

@ -117,14 +117,12 @@ class _ImageMenuState extends State<ImageMenu> {
if (mounted) { if (mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
} }
} catch (e) { } catch (e) {
if (mounted) { if (mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_fail.tr(), message: LocaleKeys.message_copy_fail.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );

View File

@ -218,7 +218,6 @@ class _MultiImageMenuState extends State<MultiImageMenu> {
ClipboardData(text: images[widget.indexNotifier.value].url), ClipboardData(text: images[widget.indexNotifier.value].url),
); );
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_plugins_image_copiedToPasteBoard.tr(), message: LocaleKeys.document_plugins_image_copiedToPasteBoard.tr(),
); );
} }

View File

@ -78,7 +78,6 @@ class _LinkPreviewMenuState extends State<LinkPreviewMenu> {
if (url != null) { if (url != null) {
Clipboard.setData(ClipboardData(text: url)); Clipboard.setData(ClipboardData(text: url));
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_plugins_urlPreview_copiedToPasteBoard.tr(), message: LocaleKeys.document_plugins_urlPreview_copiedToPasteBoard.tr(),
); );
} }

View File

@ -100,7 +100,6 @@ class ChildPageTransactionHandler extends MentionTransactionHandler {
Log.error(error); Log.error(error);
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.document_plugins_subPage_errors_failedDeletePage message: LocaleKeys.document_plugins_subPage_errors_failedDeletePage
.tr(), .tr(),
); );

View File

@ -174,11 +174,10 @@ class ExportTab extends StatelessWidget {
ClipboardServiceData(plainText: markdown), ClipboardServiceData(plainText: markdown),
); );
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
}, },
(error) => showToastNotification(context, message: error.msg), (error) => showToastNotification(message: error.msg),
); );
} }
} }

View File

@ -85,11 +85,9 @@ class PublishTab extends StatelessWidget {
if (state.publishResult != null) { if (state.publishResult != null) {
state.publishResult!.fold( state.publishResult!.fold(
(value) => showToastNotification( (value) => showToastNotification(
context,
message: LocaleKeys.publish_publishSuccessfully.tr(), message: LocaleKeys.publish_publishSuccessfully.tr(),
), ),
(error) => showToastNotification( (error) => showToastNotification(
context,
message: '${LocaleKeys.publish_publishFailed.tr()}: ${error.code}', message: '${LocaleKeys.publish_publishFailed.tr()}: ${error.code}',
type: ToastificationType.error, type: ToastificationType.error,
), ),
@ -97,11 +95,9 @@ class PublishTab extends StatelessWidget {
} else if (state.unpublishResult != null) { } else if (state.unpublishResult != null) {
state.unpublishResult!.fold( state.unpublishResult!.fold(
(value) => showToastNotification( (value) => showToastNotification(
context,
message: LocaleKeys.publish_unpublishSuccessfully.tr(), message: LocaleKeys.publish_unpublishSuccessfully.tr(),
), ),
(error) => showToastNotification( (error) => showToastNotification(
context,
message: LocaleKeys.publish_unpublishFailed.tr(), message: LocaleKeys.publish_unpublishFailed.tr(),
description: error.msg, description: error.msg,
type: ToastificationType.error, type: ToastificationType.error,
@ -110,14 +106,12 @@ class PublishTab extends StatelessWidget {
} else if (state.updatePathNameResult != null) { } else if (state.updatePathNameResult != null) {
state.updatePathNameResult!.fold( state.updatePathNameResult!.fold(
(value) => showToastNotification( (value) => showToastNotification(
context,
message: LocaleKeys.settings_sites_success_updatePathNameSuccess.tr(), message: LocaleKeys.settings_sites_success_updatePathNameSuccess.tr(),
), ),
(error) { (error) {
Log.error('update path name failed: $error'); Log.error('update path name failed: $error');
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_error_updatePathNameFailed.tr(), message: LocaleKeys.settings_sites_error_updatePathNameFailed.tr(),
type: ToastificationType.error, type: ToastificationType.error,
description: error.code.publishErrorMessage, description: error.code.publishErrorMessage,
@ -182,7 +176,6 @@ class _PublishedWidgetState extends State<_PublishedWidget> {
); );
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
}, },
@ -292,7 +285,6 @@ class _PublishWidgetState extends State<_PublishWidget> {
// check if any database is selected // check if any database is selected
if (_selectedViews.isEmpty) { if (_selectedViews.isEmpty) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.publish_noDatabaseSelected.tr(), message: LocaleKeys.publish_noDatabaseSelected.tr(),
); );
return; return;
@ -611,7 +603,6 @@ class _PublishDatabaseSelectorState extends State<_PublishDatabaseSelector> {
// unable to deselect the primary database // unable to deselect the primary database
if (isPrimaryDatabase) { if (isPrimaryDatabase) {
showToastNotification( showToastNotification(
context,
message: message:
LocaleKeys.publish_unableToDeselectPrimaryDatabase.tr(), LocaleKeys.publish_unableToDeselectPrimaryDatabase.tr(),
); );

View File

@ -70,7 +70,6 @@ class ShareButton extends StatelessWidget {
case ShareType.html: case ShareType.html:
case ShareType.csv: case ShareType.csv:
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_files_exportFileSuccess.tr(), message: LocaleKeys.settings_files_exportFileSuccess.tr(),
); );
break; break;
@ -81,7 +80,6 @@ class ShareButton extends StatelessWidget {
void _handleExportError(BuildContext context, FlowyError error) { void _handleExportError(BuildContext context, FlowyError error) {
showToastNotification( showToastNotification(
context,
message: message:
'${LocaleKeys.settings_files_exportFileFail.tr()}: ${error.code}', '${LocaleKeys.settings_files_exportFileFail.tr()}: ${error.code}',
); );

View File

@ -117,7 +117,6 @@ class _ShareTabContent extends StatelessWidget {
); );
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
} }

View File

@ -45,7 +45,6 @@ class _MobileSyncErrorPage extends StatelessWidget {
onTapUp: () { onTapUp: () {
getIt<ClipboardService>().setPlainText(error.toString()); getIt<ClipboardService>().setPlainText(error.toString());
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
bottomPadding: 0, bottomPadding: 0,
); );
@ -101,7 +100,7 @@ class _DesktopSyncErrorPage extends StatelessWidget {
onTapUp: () { onTapUp: () {
getIt<ClipboardService>().setPlainText(error.toString()); getIt<ClipboardService>().setPlainText(error.toString());
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
bottomPadding: 0, bottomPadding: 0,
); );

View File

@ -129,7 +129,7 @@ class AppFlowyCloudDeepLink {
final context = AppGlobals.rootNavKey.currentState?.context; final context = AppGlobals.rootNavKey.currentState?.context;
if (context != null) { if (context != null) {
showToastNotification( showToastNotification(
context,
message: err.msg, message: err.msg,
); );
} }

View File

@ -17,14 +17,14 @@ void handleOpenWorkspaceError(BuildContext context, FlowyError error) {
case ErrorCode.InvalidEncryptSecret: case ErrorCode.InvalidEncryptSecret:
case ErrorCode.NetworkError: case ErrorCode.NetworkError:
showToastNotification( showToastNotification(
context,
message: error.msg, message: error.msg,
type: ToastificationType.error, type: ToastificationType.error,
); );
break; break;
default: default:
showToastNotification( showToastNotification(
context,
message: error.msg, message: error.msg,
type: ToastificationType.error, type: ToastificationType.error,
callbacks: ToastificationCallbacks( callbacks: ToastificationCallbacks(

View File

@ -65,7 +65,7 @@ class _SignInWithMagicLinkButtonsState
void _sendMagicLink(BuildContext context, String email) { void _sendMagicLink(BuildContext context, String email) {
if (!isEmail(email)) { if (!isEmail(email)) {
return showToastNotification( return showToastNotification(
context,
message: LocaleKeys.signIn_invalidEmail.tr(), message: LocaleKeys.signIn_invalidEmail.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );

View File

@ -25,7 +25,7 @@ Future<void> shareLogFiles(BuildContext? context) async {
if (archiveLogFiles.isEmpty) { if (archiveLogFiles.isEmpty) {
if (context != null && context.mounted) { if (context != null && context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.noLogFiles.tr(), message: LocaleKeys.noLogFiles.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );
@ -42,7 +42,7 @@ Future<void> shareLogFiles(BuildContext? context) async {
if (zip == null) { if (zip == null) {
if (context != null && context.mounted) { if (context != null && context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.noLogFiles.tr(), message: LocaleKeys.noLogFiles.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );
@ -72,7 +72,7 @@ Future<void> shareLogFiles(BuildContext? context) async {
} catch (e) { } catch (e) {
if (context != null && context.mounted) { if (context != null && context.mounted) {
showToastNotification( showToastNotification(
context,
message: e.toString(), message: e.toString(),
type: ToastificationType.error, type: ToastificationType.error,
); );

View File

@ -2,11 +2,13 @@ import 'dart:async';
import 'package:appflowy/core/config/kv.dart'; import 'package:appflowy/core/config/kv.dart';
import 'package:appflowy/core/config/kv_keys.dart'; import 'package:appflowy/core/config/kv_keys.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart'; import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/user_settings_service.dart'; import 'package:appflowy/user/application/user_settings_service.dart';
import 'package:appflowy/util/color_to_hex_string.dart'; import 'package:appflowy/util/color_to_hex_string.dart';
import 'package:appflowy/workspace/application/appearance_defaults.dart'; import 'package:appflowy/workspace/application/appearance_defaults.dart';
import 'package:appflowy/workspace/application/settings/appearance/base_appearance.dart'; import 'package:appflowy/workspace/application/settings/appearance/base_appearance.dart';
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-user/date_time.pbenum.dart'; import 'package:appflowy_backend/protobuf/flowy-user/date_time.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-user/user_setting.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-user/user_setting.pb.dart';
@ -17,6 +19,7 @@ import 'package:flowy_infra/theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:universal_platform/universal_platform.dart';
part 'appearance_cubit.freezed.dart'; part 'appearance_cubit.freezed.dart';
@ -97,7 +100,19 @@ class AppearanceSettingsCubit extends Cubit<AppearanceSettingsState> {
Future<void> setTheme(String themeName) async { Future<void> setTheme(String themeName) async {
_appearanceSettings.theme = themeName; _appearanceSettings.theme = themeName;
unawaited(_saveAppearanceSettings()); unawaited(_saveAppearanceSettings());
emit(state.copyWith(appTheme: await AppTheme.fromName(themeName))); try {
final theme = await AppTheme.fromName(themeName);
emit(state.copyWith(appTheme: theme));
} catch (e) {
Log.error("Error setting theme: $e");
if (UniversalPlatform.isMacOS) {
showToastNotification(
message:
LocaleKeys.settings_workspacePage_theme_failedToLoadThemes.tr(),
type: ToastificationType.error,
);
}
}
} }
/// Reset the current user selected theme back to the default /// Reset the current user selected theme back to the default

View File

@ -169,7 +169,7 @@ class _SidebarWorkspaceState extends State<SidebarWorkspace> {
if (message != null) { if (message != null) {
showToastNotification( showToastNotification(
context,
message: message, message: message,
type: result.fold( type: result.fold(
(_) => ToastificationType.success, (_) => ToastificationType.success,

View File

@ -193,7 +193,7 @@ Future<void> deleteMyAccount(
if (!isChecked) { if (!isChecked) {
showToastNotification( showToastNotification(
context,
type: ToastificationType.warning, type: ToastificationType.warning,
bottomPadding: bottomPadding, bottomPadding: bottomPadding,
message: LocaleKeys message: LocaleKeys
@ -208,7 +208,7 @@ Future<void> deleteMyAccount(
if (confirmText.isEmpty || !_isConfirmTextValid(confirmText)) { if (confirmText.isEmpty || !_isConfirmTextValid(confirmText)) {
showToastNotification( showToastNotification(
context,
type: ToastificationType.warning, type: ToastificationType.warning,
bottomPadding: bottomPadding, bottomPadding: bottomPadding,
message: LocaleKeys message: LocaleKeys
@ -226,7 +226,7 @@ Future<void> deleteMyAccount(
loading.stop(); loading.stop();
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.newSettings_myAccount_deleteAccount_deleteAccountSuccess .newSettings_myAccount_deleteAccount_deleteAccountSuccess
.tr(), .tr(),
@ -245,7 +245,7 @@ Future<void> deleteMyAccount(
loading.stop(); loading.stop();
showToastNotification( showToastNotification(
context,
type: ToastificationType.error, type: ToastificationType.error,
bottomPadding: bottomPadding, bottomPadding: bottomPadding,
message: f.msg, message: f.msg,

View File

@ -157,7 +157,7 @@ class SettingsManageDataView extends StatelessWidget {
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.settings_manageDataPage_cache_dialog_successHint .settings_manageDataPage_cache_dialog_successHint
.tr(), .tr(),

View File

@ -53,7 +53,6 @@ class SettingsPageSitesEvent {
); );
getIt<ClipboardService>().setData(ClipboardServiceData(plainText: url)); getIt<ClipboardService>().setData(ClipboardServiceData(plainText: url));
showToastNotification( showToastNotification(
context,
message: LocaleKeys.message_copy_success.tr(), message: LocaleKeys.message_copy_success.tr(),
); );
} }

View File

@ -253,7 +253,6 @@ class _FreePlanUpgradeButton extends StatelessWidget {
onTap: () { onTap: () {
if (isOwner) { if (isOwner) {
showToastNotification( showToastNotification(
context,
message: message:
LocaleKeys.settings_sites_namespace_redirectToPayment.tr(), LocaleKeys.settings_sites_namespace_redirectToPayment.tr(),
type: ToastificationType.info, type: ToastificationType.info,
@ -264,7 +263,6 @@ class _FreePlanUpgradeButton extends StatelessWidget {
); );
} else { } else {
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.settings_sites_namespace_pleaseAskOwnerToSetHomePage .settings_sites_namespace_pleaseAskOwnerToSetHomePage
.tr(), .tr(),

View File

@ -216,7 +216,6 @@ class _DomainSettingsDialogState extends State<DomainSettingsDialog> {
result.fold( result.fold(
(s) { (s) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_success_namespaceUpdated.tr(), message: LocaleKeys.settings_sites_success_namespaceUpdated.tr(),
); );
@ -234,7 +233,6 @@ class _DomainSettingsDialogState extends State<DomainSettingsDialog> {
Log.error('Failed to update namespace: $f'); Log.error('Failed to update namespace: $f');
showToastNotification( showToastNotification(
context,
message: basicErrorMessage, message: basicErrorMessage,
type: ToastificationType.error, type: ToastificationType.error,
description: errorMessage, description: errorMessage,

View File

@ -203,7 +203,6 @@ class _PublishedViewSettingsDialogState
result.fold( result.fold(
(s) { (s) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_success_updatePathNameSuccess.tr(), message: LocaleKeys.settings_sites_success_updatePathNameSuccess.tr(),
); );
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -212,7 +211,6 @@ class _PublishedViewSettingsDialogState
Log.error('update path name failed: $f'); Log.error('update path name failed: $f');
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_error_updatePathNameFailed.tr(), message: LocaleKeys.settings_sites_error_updatePathNameFailed.tr(),
type: ToastificationType.error, type: ToastificationType.error,
description: f.code.publishErrorMessage, description: f.code.publishErrorMessage,

View File

@ -178,7 +178,6 @@ class _SettingsSitesPageView extends StatelessWidget {
Log.error('Failed to generate payment link for Pro Plan: ${f.msg}'); Log.error('Failed to generate payment link for Pro Plan: ${f.msg}');
showToastNotification( showToastNotification(
context,
message: message:
LocaleKeys.settings_sites_error_failedToGeneratePaymentLink.tr(), LocaleKeys.settings_sites_error_failedToGeneratePaymentLink.tr(),
type: ToastificationType.error, type: ToastificationType.error,
@ -188,14 +187,12 @@ class _SettingsSitesPageView extends StatelessWidget {
result != null) { result != null) {
result.fold((_) { result.fold((_) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.publish_unpublishSuccessfully.tr(), message: LocaleKeys.publish_unpublishSuccessfully.tr(),
); );
}, (f) { }, (f) {
Log.error('Failed to unpublish view: ${f.msg}'); Log.error('Failed to unpublish view: ${f.msg}');
showToastNotification( showToastNotification(
context,
message: LocaleKeys.publish_unpublishFailed.tr(), message: LocaleKeys.publish_unpublishFailed.tr(),
type: ToastificationType.error, type: ToastificationType.error,
description: f.msg, description: f.msg,
@ -204,14 +201,12 @@ class _SettingsSitesPageView extends StatelessWidget {
} else if (type == SettingsSitesActionType.setHomePage && result != null) { } else if (type == SettingsSitesActionType.setHomePage && result != null) {
result.fold((s) { result.fold((s) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_success_setHomepageSuccess.tr(), message: LocaleKeys.settings_sites_success_setHomepageSuccess.tr(),
); );
}, (f) { }, (f) {
Log.error('Failed to set homepage: ${f.msg}'); Log.error('Failed to set homepage: ${f.msg}');
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_error_setHomepageFailed.tr(), message: LocaleKeys.settings_sites_error_setHomepageFailed.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );
@ -220,14 +215,12 @@ class _SettingsSitesPageView extends StatelessWidget {
result != null) { result != null) {
result.fold((s) { result.fold((s) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_success_removeHomePageSuccess.tr(), message: LocaleKeys.settings_sites_success_removeHomePageSuccess.tr(),
); );
}, (f) { }, (f) {
Log.error('Failed to remove homepage: ${f.msg}'); Log.error('Failed to remove homepage: ${f.msg}');
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_sites_error_removeHomePageFailed.tr(), message: LocaleKeys.settings_sites_error_removeHomePageFailed.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );

View File

@ -363,7 +363,6 @@ class _SelfHostSettingsState extends State<_SelfHostSettings> {
}) async { }) async {
if (cloudUrl.isEmpty || webUrl.isEmpty) { if (cloudUrl.isEmpty || webUrl.isEmpty) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_menu_pleaseInputValidURL.tr(), message: LocaleKeys.settings_menu_pleaseInputValidURL.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );
@ -375,7 +374,6 @@ class _SelfHostSettingsState extends State<_SelfHostSettings> {
if (mounted) { if (mounted) {
if (isValid) { if (isValid) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_menu_changeUrl.tr(args: [cloudUrl]), message: LocaleKeys.settings_menu_changeUrl.tr(args: [cloudUrl]),
); );
@ -387,7 +385,6 @@ class _SelfHostSettingsState extends State<_SelfHostSettings> {
await runAppFlowy(); await runAppFlowy();
} else { } else {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.settings_menu_pleaseInputValidURL.tr(), message: LocaleKeys.settings_menu_pleaseInputValidURL.tr(),
type: ToastificationType.error, type: ToastificationType.error,
); );
@ -522,7 +519,6 @@ class _SupportSettings extends StatelessWidget {
await getIt<FlowyCacheManager>().clearAllCache(); await getIt<FlowyCacheManager>().clearAllCache();
if (context.mounted) { if (context.mounted) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys message: LocaleKeys
.settings_manageDataPage_cache_dialog_successHint .settings_manageDataPage_cache_dialog_successHint
.tr(), .tr(),

View File

@ -157,7 +157,6 @@ class _NavigatorTextFieldDialogState extends State<NavigatorTextFieldDialog> {
onOkPressed: () { onOkPressed: () {
if (newValue.isEmpty) { if (newValue.isEmpty) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.space_spaceNameCannotBeEmpty.tr(), message: LocaleKeys.space_spaceNameCannotBeEmpty.tr(),
); );
return; return;
@ -363,8 +362,7 @@ class OkCancelButton extends StatelessWidget {
} }
} }
void showToastNotification( void showToastNotification({
BuildContext context, {
String? message, String? message,
TextSpan? richMessage, TextSpan? richMessage,
String? description, String? description,

View File

@ -51,7 +51,6 @@ class FlowyVersionSection extends CustomActionCell {
} }
enableDocumentInternalLog = !enableDocumentInternalLog; enableDocumentInternalLog = !enableDocumentInternalLog;
showToastNotification( showToastNotification(
context,
message: enableDocumentInternalLog message: enableDocumentInternalLog
? 'Enabled Internal Log' ? 'Enabled Internal Log'
: 'Disabled Internal Log', : 'Disabled Internal Log',

View File

@ -74,7 +74,6 @@ class ViewTitleBar extends StatelessWidget {
listener: (context, state) { listener: (context, state) {
if (state.isLocked) { if (state.isLocked) {
showToastNotification( showToastNotification(
context,
message: LocaleKeys.lockPage_pageLockedToast.tr(), message: LocaleKeys.lockPage_pageLockedToast.tr(),
); );
} }

View File

@ -628,7 +628,8 @@
"theme": { "theme": {
"title": "Theme", "title": "Theme",
"description": "Select a preset theme, or upload your own custom theme.", "description": "Select a preset theme, or upload your own custom theme.",
"uploadCustomThemeTooltip": "Upload a custom theme" "uploadCustomThemeTooltip": "Upload a custom theme",
"failedToLoadThemes": "Failed to load themes, please check your permission settings in System Settings > Privacy and Security > Files and Folders > @:appName"
}, },
"workspaceFont": { "workspaceFont": {
"title": "Workspace font", "title": "Workspace font",