From 19d9e7717ced39fac29d4f06b82e4252eb71b456 Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Fri, 17 Nov 2023 13:52:33 +0800 Subject: [PATCH] chore: use page icon instead of document icon (#3952) --- .../bottom_sheet/bottom_sheet_add_new_page.dart | 2 +- .../mobile/presentation/home/mobile_home_trash_page.dart | 2 +- .../appflowy_flutter/lib/plugins/document/document.dart | 2 +- .../database/referenced_database_menu_item.dart | 2 +- .../editor_plugins/header/custom_cover_picker.dart | 2 +- .../lib/workspace/application/view/view_ext.dart | 8 ++++---- .../home/menu/sidebar/import/import_type.dart | 2 +- frontend/resources/flowy_icons/16x/document.svg | 3 +++ frontend/resources/flowy_icons/16x/documents.svg | 4 ---- frontend/resources/flowy_icons/16x/page.svg | 4 ---- 10 files changed, 13 insertions(+), 18 deletions(-) create mode 100644 frontend/resources/flowy_icons/16x/document.svg delete mode 100644 frontend/resources/flowy_icons/16x/documents.svg delete mode 100644 frontend/resources/flowy_icons/16x/page.svg diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_add_new_page.dart b/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_add_new_page.dart index a89cf44f7b..d9c5e7c1e5 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_add_new_page.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/bottom_sheet/bottom_sheet_add_new_page.dart @@ -25,7 +25,7 @@ class AddNewPageWidgetBottomSheet extends StatelessWidget { children: [ Expanded( child: BottomSheetActionWidget( - svg: FlowySvgs.documents_s, + svg: FlowySvgs.document_s, text: LocaleKeys.document_menuName.tr(), onTap: () => onAction(ViewLayoutPB.Document), ), diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_trash_page.dart b/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_trash_page.dart index 569e50eb8c..ecd79c85f9 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_trash_page.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_trash_page.dart @@ -162,7 +162,7 @@ class _DeletedFilesListView extends StatelessWidget { child: ListTile( // TODO(Yijing): implement file type after TrashPB has file type leading: FlowySvg( - FlowySvgs.documents_s, + FlowySvgs.document_s, size: const Size.square(24), color: theme.colorScheme.onSurface, ), diff --git a/frontend/appflowy_flutter/lib/plugins/document/document.dart b/frontend/appflowy_flutter/lib/plugins/document/document.dart index 23b4ae88b8..bc0b6fe2eb 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/document.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/document.dart @@ -30,7 +30,7 @@ class DocumentPluginBuilder extends PluginBuilder { String get menuName => LocaleKeys.document_menuName.tr(); @override - FlowySvgData get icon => FlowySvgs.documents_s; + FlowySvgData get icon => FlowySvgs.document_s; @override PluginType get pluginType => PluginType.editor; diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/database/referenced_database_menu_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/database/referenced_database_menu_item.dart index 976a0186dd..5c7ca42d3f 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/database/referenced_database_menu_item.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/database/referenced_database_menu_item.dart @@ -12,7 +12,7 @@ import 'package:flutter/material.dart'; SelectionMenuItem referencedDocumentMenuItem = SelectionMenuItem( name: LocaleKeys.document_plugins_referencedDocument.tr(), icon: (editorState, onSelected, style) => SelectableSvgWidget( - data: FlowySvgs.documents_s, + data: FlowySvgs.document_s, isSelected: onSelected, style: style, ), diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/custom_cover_picker.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/custom_cover_picker.dart index 3dade8ae1a..1738acf4c1 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/custom_cover_picker.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/custom_cover_picker.dart @@ -243,7 +243,7 @@ class _CoverImagePreviewWidgetState extends State { }, useIntrinsicWidth: true, leftIcon: const FlowySvg( - FlowySvgs.page_s, + FlowySvgs.document_s, size: Size(20, 20), ), text: FlowyText( diff --git a/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart b/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart index 6958eadd99..0cd995847b 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/view/view_ext.dart @@ -40,7 +40,7 @@ extension FlowyPluginExtension on FlowyPlugin { extension ViewExtension on ViewPB { Widget renderThumbnail({Color? iconColor}) { - const Widget widget = FlowySvg(FlowySvgs.page_s); + const Widget widget = FlowySvg(FlowySvgs.document_s); return widget; } @@ -50,8 +50,8 @@ extension ViewExtension on ViewPB { ViewLayoutPB.Board => FlowySvgs.board_s, ViewLayoutPB.Calendar => FlowySvgs.date_s, ViewLayoutPB.Grid => FlowySvgs.grid_s, - ViewLayoutPB.Document => FlowySvgs.documents_s, - _ => FlowySvgs.documents_s, + ViewLayoutPB.Document => FlowySvgs.document_s, + _ => FlowySvgs.document_s, }, ); } @@ -139,7 +139,7 @@ extension ViewLayoutExtension on ViewLayoutPB { case ViewLayoutPB.Calendar: return FlowySvgs.date_s; case ViewLayoutPB.Document: - return FlowySvgs.documents_s; + return FlowySvgs.document_s; default: throw Exception('Unknown layout type'); } diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/import/import_type.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/import/import_type.dart index 86a2797f1a..3728cbee7b 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/import/import_type.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/import/import_type.dart @@ -31,7 +31,7 @@ enum ImportType { final FlowySvgData svg; switch (this) { case ImportType.historyDatabase: - svg = FlowySvgs.documents_s; + svg = FlowySvgs.document_s; case ImportType.historyDocument: case ImportType.databaseCSV: case ImportType.databaseRawData: diff --git a/frontend/resources/flowy_icons/16x/document.svg b/frontend/resources/flowy_icons/16x/document.svg new file mode 100644 index 0000000000..abb59d5c14 --- /dev/null +++ b/frontend/resources/flowy_icons/16x/document.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/resources/flowy_icons/16x/documents.svg b/frontend/resources/flowy_icons/16x/documents.svg deleted file mode 100644 index e232eba85d..0000000000 --- a/frontend/resources/flowy_icons/16x/documents.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/frontend/resources/flowy_icons/16x/page.svg b/frontend/resources/flowy_icons/16x/page.svg deleted file mode 100644 index f0fb8ce9ce..0000000000 --- a/frontend/resources/flowy_icons/16x/page.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -