From 4ffc1679670e4a1494f2ca3371746240c1de2685 Mon Sep 17 00:00:00 2001 From: DelLevin-Home Date: Sun, 9 Aug 2026 22:07:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=90=9C=E7=B4=A2=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/explore/stroll_page.dart | 4 +- lib/pages/home/desktop_home_page.dart | 2 +- lib/pages/home/home_page.dart | 10 +- lib/pages/home/main_content_page.dart | 34 +------ lib/pages/note/note_tab_page.dart | 4 +- .../online_search/online_search_page.dart | 93 ++++++++++++------- lib/pages/online_search/search_hub_page.dart | 92 ++++++++++++++++++ lib/pages/online_search/search_page.dart | 46 +++++---- lib/pages/profile/feature_settings_page.dart | 4 +- lib/pages/profile/layout_settings_page.dart | 2 +- lib/pages/settings/tag_management_page.dart | 2 +- lib/utils/user_prefs.dart | 4 + lib/widgets/add_sheet.dart | 2 +- lib/widgets/add_type_selector.dart | 2 +- lib/widgets/custom_drawer.dart | 6 +- 15 files changed, 206 insertions(+), 101 deletions(-) create mode 100644 lib/pages/online_search/search_hub_page.dart diff --git a/lib/pages/explore/stroll_page.dart b/lib/pages/explore/stroll_page.dart index e309de4..2eadd9e 100644 --- a/lib/pages/explore/stroll_page.dart +++ b/lib/pages/explore/stroll_page.dart @@ -85,7 +85,7 @@ class _StrollPageState extends State { subtitle: n.tags.take(3).join(' · '), detail: n.content, imagePath: n.images.isNotEmpty ? n.images.first : null, - icon: Icons.note_outlined, label: '笔记', + icon: Icons.sticky_note_2_outlined, label: '笔记', createdAt: n.createdAt, tags: n.tags.take(3).toList(), color: const Color(0xFF66BB6A), @@ -376,7 +376,7 @@ class _StrollPageState extends State { ('all', '全部', Icons.apps_outlined), ('movie', '影视', Icons.movie_outlined), ('book', '书籍', Icons.menu_book_outlined), - ('note', '笔记', Icons.note_outlined), + ('note', '笔记', Icons.sticky_note_2_outlined), ('game', '游戏', Icons.sports_esports_outlined), ]; return Padding( diff --git a/lib/pages/home/desktop_home_page.dart b/lib/pages/home/desktop_home_page.dart index f4048cd..1fe970a 100644 --- a/lib/pages/home/desktop_home_page.dart +++ b/lib/pages/home/desktop_home_page.dart @@ -168,7 +168,7 @@ class _DesktopHomePageState extends State { if (_showNotes) { final words = fn.fold(0, (sum, n) => sum + n.content.length); final ws = words >= 10000 ? '${(words / 10000).toStringAsFixed(1)}万' : '$words'; - items.add(_ModuleData(Icons.note_outlined, '笔记', fn.length, '$ws字', _noteColor, 2)); + items.add(_ModuleData(Icons.sticky_note_2_outlined, '笔记', fn.length, '$ws字', _noteColor, 2)); } if (_showGames) { final completed = fg.where((g) => g.status == 'completed').length; diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 2c32a92..f7a1d4d 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -307,8 +307,8 @@ class _DesktopIconRail extends StatelessWidget { static const _categoryMeta = [ (Icons.movie_outlined, Icons.movie, '影视', 0, Color(0xFF2563EB)), (Icons.menu_book_outlined, Icons.menu_book, '阅读', 1, Color(0xFF16A34A)), - (Icons.note_outlined, Icons.note, '笔记', 2, Color(0xFF9333EA)), (Icons.sports_esports_outlined, Icons.sports_esports, '游戏', 3, Color(0xFFEA580C)), + (Icons.sticky_note_2_outlined, Icons.sticky_note_2, '笔记', 2, Color(0xFF9333EA)), ]; @override @@ -880,7 +880,7 @@ class _StrollDialogState extends State<_StrollDialog> { for (final n in provider.notes.where((n) => !n.isDeleted)) { notePool.add(_StrollItem(type: 'note', data: n, id: 'n_${n.id}', title: n.title.isNotEmpty ? n.title : '随手记', subtitle: n.tags.take(3).join(' · '), detail: n.content, imagePath: n.images.isNotEmpty ? n.images.first : null, - icon: Icons.note_outlined, label: '笔记', createdAt: n.createdAt, + icon: Icons.sticky_note_2_outlined, label: '笔记', createdAt: n.createdAt, tags: n.tags.take(3).toList(), color: const Color(0xFF66BB6A))); } } @@ -1758,7 +1758,7 @@ class _TagManagementDialogState extends State<_TagManagementDialog> { static const _tabTypes = ['movie_genre', 'book_genre', 'note_tag', 'game_genre']; static const _typeLabels = ['影视类型', '书籍类型', '笔记标签', '游戏类型']; - static const _typeIcons = [Icons.movie_outlined, Icons.menu_book_outlined, Icons.note_outlined, Icons.sports_esports_outlined]; + static const _typeIcons = [Icons.movie_outlined, Icons.menu_book_outlined, Icons.sticky_note_2_outlined, Icons.sports_esports_outlined]; final Map>> _tagCache = {}; Map _usageCounts = {}; @@ -3918,7 +3918,7 @@ class _DesktopListPanelState extends State<_DesktopListPanel> { if (a.isPinned != b.isPinned) return a.isPinned ? -1 : 1; return b.createdAt.compareTo(a.createdAt); }); - if (items.isEmpty) return _buildEmpty('暂无笔记记录', Icons.note_outlined); + if (items.isEmpty) return _buildEmpty('暂无笔记记录', Icons.sticky_note_2_outlined); return ListView.builder( padding: const EdgeInsets.symmetric(vertical: 4), itemCount: items.length, @@ -4096,7 +4096,7 @@ class _DesktopListPanelState extends State<_DesktopListPanel> { subtitle: n.content.length > 40 ? '${n.content.substring(0, 40)}...' : null, imagePath: null, accentColor: const Color(0xFF9333EA), - icon: Icons.note_outlined, + icon: Icons.sticky_note_2_outlined, selected: provider.selectedNote?.id == n.id, onTap: () { provider.setMainTabIndex(2); diff --git a/lib/pages/home/main_content_page.dart b/lib/pages/home/main_content_page.dart index 79f4f33..0cdd0f2 100644 --- a/lib/pages/home/main_content_page.dart +++ b/lib/pages/home/main_content_page.dart @@ -8,8 +8,7 @@ import '../movies/movie_tab_page.dart'; import '../book/book_tab_page.dart'; import '../note/note_tab_page.dart'; import '../game/game_tab_page.dart'; -import '../online_search/search_page.dart'; -import '../online_search/online_search_page.dart'; +import '../online_search/search_hub_page.dart'; import '../sync/webdav_sync_page.dart'; /// 主内容页 - 观影/阅读/笔记标签页(PageView 滑动切换) @@ -71,8 +70,8 @@ class _MainContentPageState extends State { final tabs = <_TabItem>[]; if (_showMovieTab) tabs.add(_TabItem('影视', 0)); if (_showBookTab) tabs.add(_TabItem('阅读', 1)); - if (_showNoteTab) tabs.add(_TabItem('笔记', 2)); if (_showGameTab) tabs.add(_TabItem('游戏', 3)); + if (_showNoteTab) tabs.add(_TabItem('笔记', 2)); return tabs; } @@ -119,30 +118,7 @@ class _MainContentPageState extends State { _buildCloudSyncButton(context), IconButton( icon: const Icon(Icons.search), - onPressed: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const SearchPage())), - ), - if (UserPrefs().enhancedSearchEnabled) - IconButton( - icon: Stack( - clipBehavior: Clip.none, - children: [ - const Icon(Icons.search, size: 22), - Positioned( - right: -3, - top: -3, - child: Container( - width: 12, - height: 12, - decoration: BoxDecoration( - color: colors.surface, - shape: BoxShape.circle, - ), - child: Icon(Icons.add, size: 10, color: colors.onSurface), - ), - ), - ], - ), - onPressed: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const OnlineSearchPage())), + onPressed: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const SearchHubPage())), ), ], ); @@ -431,8 +407,8 @@ class _MainContentPageState extends State { children: [ if (_showMovieTab) const MovieTabPage(), if (_showBookTab) const BookTabPage(), - if (_showNoteTab) const NoteTabPage(), if (_showGameTab) const GameTabPage(), + if (_showNoteTab) const NoteTabPage(), ], ); }, @@ -443,7 +419,7 @@ class _MainContentPageState extends State { switch (label) { case '影视': return Icons.movie_outlined; case '阅读': return Icons.menu_book_outlined; - case '笔记': return Icons.note_outlined; + case '笔记': return Icons.sticky_note_2_outlined; case '游戏': return Icons.sports_esports_outlined; default: return Icons.circle; } diff --git a/lib/pages/note/note_tab_page.dart b/lib/pages/note/note_tab_page.dart index a07775e..fd299d4 100644 --- a/lib/pages/note/note_tab_page.dart +++ b/lib/pages/note/note_tab_page.dart @@ -147,7 +147,7 @@ class _NoteTabPageState extends State { ? NoteAddPage(onCancel: () => provider.cancelAdding()) : provider.selectedNote != null ? NoteDetailPage(note: provider.selectedNote!, embedded: true) - : const DetailPlaceholder(icon: Icons.note_outlined, message: '选择一条笔记查看详情'); + : const DetailPlaceholder(icon: Icons.sticky_note_2_outlined, message: '选择一条笔记查看详情'); return MasterDetailScaffold( master: masterContent, detail: detailWidget, @@ -417,7 +417,7 @@ class _NoteTabPageState extends State { return Center(child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ Container(width: 80, height: 80, decoration: BoxDecoration(color: colors.surfaceContainerHighest, borderRadius: BorderRadius.circular(20)), - child: Icon(Icons.note_outlined, size: 40, color: colors.onSurface.withValues(alpha: 0.25))), + child: Icon(Icons.sticky_note_2_outlined, size: 40, color: colors.onSurface.withValues(alpha: 0.25))), const SizedBox(height: 20), Text('暂无笔记', style: TextStyle(fontSize: 16, color: colors.onSurface.withValues(alpha: 0.4))), ])); diff --git a/lib/pages/online_search/online_search_page.dart b/lib/pages/online_search/online_search_page.dart index 66907bc..a10ea6e 100644 --- a/lib/pages/online_search/online_search_page.dart +++ b/lib/pages/online_search/online_search_page.dart @@ -7,15 +7,34 @@ import '../../utils/toast_util.dart'; import 'movie_detail_page.dart'; import 'book_detail_page.dart'; -/// 在线搜索影视/书籍 -class OnlineSearchPage extends StatefulWidget { +/// 在线搜索影视/书籍(带 Scaffold + AppBar) +class OnlineSearchPage extends StatelessWidget { const OnlineSearchPage({super.key}); @override - State createState() => _OnlineSearchPageState(); + Widget build(BuildContext context) { + final colors = Theme.of(context).colorScheme; + return Scaffold( + backgroundColor: colors.surface, + appBar: AppBar( + title: const Text('在线搜索'), + elevation: 0, + scrolledUnderElevation: 0, + ), + body: const OnlineSearchPageBody(), + ); + } } -class _OnlineSearchPageState extends State { +/// 在线搜索 body —— 可嵌入到统一搜索页 SearchHubPage +class OnlineSearchPageBody extends StatefulWidget { + const OnlineSearchPageBody({super.key}); + + @override + State createState() => _OnlineSearchPageBodyState(); +} + +class _OnlineSearchPageBodyState extends State { final _searchController = TextEditingController(); final _focusNode = FocusNode(); final _movieScrollController = ScrollController(); @@ -252,39 +271,45 @@ class _OnlineSearchPageState extends State { @override Widget build(BuildContext context) { final colors = Theme.of(context).colorScheme; - return Scaffold( - backgroundColor: colors.surface, - appBar: AppBar( - titleSpacing: 8, - title: _buildSearchBar(colors), - actions: [ - TextButton( - onPressed: _doSearch, - child: Text('搜索', - style: TextStyle(fontSize: 14, color: colors.primary)), + return Material( + color: colors.surface, + child: Column( + children: [ + // 搜索栏 + 搜索按钮 + Padding( + padding: const EdgeInsets.fromLTRB(12, 8, 8, 8), + child: Row( + children: [ + Expanded(child: _buildSearchBar(colors)), + TextButton( + onPressed: _doSearch, + child: Text('搜索', + style: TextStyle(fontSize: 14, color: colors.primary)), + ), + ], + ), + ), + // 影视/书籍 tab 栏(搜索后显示) + if (_hasSearched) + Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: colors.outlineVariant, width: 0.5))), + child: Row(children: [ + _buildTabButton(colors, '影视', 0, _movieTotal), + _buildTabButton(colors, '书籍', 1, _bookTotal), + ]), + ), + Expanded( + child: _hasSearched + ? (_currentTab == 0 + ? _buildMovieResults(colors) + : _buildBookResults(colors)) + : _buildHistoryPanel(colors), ), ], - bottom: _hasSearched - ? PreferredSize( - preferredSize: const Size.fromHeight(40), - child: Container( - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: colors.outlineVariant, width: 0.5))), - child: Row(children: [ - _buildTabButton(colors, '影视', 0, _movieTotal), - _buildTabButton(colors, '书籍', 1, _bookTotal), - ]), - ), - ) - : null, ), - body: _hasSearched - ? (_currentTab == 0 - ? _buildMovieResults(colors) - : _buildBookResults(colors)) - : _buildHistoryPanel(colors), ); } diff --git a/lib/pages/online_search/search_hub_page.dart b/lib/pages/online_search/search_hub_page.dart new file mode 100644 index 0000000..289a3c1 --- /dev/null +++ b/lib/pages/online_search/search_hub_page.dart @@ -0,0 +1,92 @@ +import 'package:flutter/material.dart'; +import '../../utils/user_prefs.dart'; +import 'search_page.dart'; +import 'online_search_page.dart'; + +/// 统一搜索页 —— 本地搜索 / 增强搜索(在线)切换 +class SearchHubPage extends StatefulWidget { + const SearchHubPage({super.key}); + + @override + State createState() => _SearchHubPageState(); +} + +class _SearchHubPageState extends State { + late bool _isOnline; + + @override + void initState() { + super.initState(); + _isOnline = UserPrefs().lastSearchOnline; + } + + void _switchTo(bool online) { + if (!mounted || _isOnline == online) return; + setState(() => _isOnline = online); + UserPrefs().setLastSearchOnline(online); + } + + @override + Widget build(BuildContext context) { + final colors = Theme.of(context).colorScheme; + final showToggle = UserPrefs().enhancedSearchEnabled; + return Scaffold( + appBar: AppBar( + title: const Text('搜索'), + elevation: 0, + scrolledUnderElevation: 0, + actions: [ + if (showToggle) _buildToggle(colors), + const SizedBox(width: 4), + ], + ), + body: IndexedStack( + index: _isOnline ? 1 : 0, + children: const [ + SearchPageBody(), + OnlineSearchPageBody(), + ], + ), + ); + } + + Widget _buildToggle(ColorScheme colors) { + return Container( + margin: const EdgeInsets.only(right: 8), + padding: const EdgeInsets.all(2), + decoration: BoxDecoration( + color: colors.surfaceContainerHighest.withValues(alpha: 0.6), + borderRadius: BorderRadius.circular(8), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + _toggleBtn('本地', !_isOnline, () => _switchTo(false), colors), + _toggleBtn('增强', _isOnline, () => _switchTo(true), colors), + ], + ), + ); + } + + Widget _toggleBtn(String label, bool selected, VoidCallback onTap, ColorScheme colors) { + return Material( + color: selected ? colors.primary : Colors.transparent, + borderRadius: BorderRadius.circular(6), + child: InkWell( + onTap: onTap, + borderRadius: BorderRadius.circular(6), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), + child: Text( + label, + style: TextStyle( + fontSize: 12, + fontWeight: selected ? FontWeight.w600 : FontWeight.w400, + color: selected ? colors.onPrimary : colors.onSurface.withValues(alpha: 0.55), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/online_search/search_page.dart b/lib/pages/online_search/search_page.dart index ff48a22..6c6c48a 100644 --- a/lib/pages/online_search/search_page.dart +++ b/lib/pages/online_search/search_page.dart @@ -9,15 +9,34 @@ import '../note/note_detail_page.dart'; import '../game/game_detail_page.dart'; import '../../widgets/fade_in_local_image.dart'; -/// 搜索页面 -class SearchPage extends StatefulWidget { +/// 搜索页面(带 Scaffold + AppBar) +class SearchPage extends StatelessWidget { const SearchPage({super.key}); @override - State createState() => _SearchPageState(); + Widget build(BuildContext context) { + final colors = Theme.of(context).colorScheme; + return Scaffold( + backgroundColor: colors.surface, + appBar: AppBar( + title: const Text('搜索'), + elevation: 0, + scrolledUnderElevation: 0, + ), + body: const SearchPageBody(), + ); + } } -class _SearchPageState extends State { +/// 搜索页 body —— 可嵌入到统一搜索页 SearchHubPage +class SearchPageBody extends StatefulWidget { + const SearchPageBody({super.key}); + + @override + State createState() => _SearchPageBodyState(); +} + +class _SearchPageBodyState extends State { final _searchController = TextEditingController(); final _focusNode = FocusNode(); @@ -33,12 +52,6 @@ class _SearchPageState extends State { Timer? _debounce; - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) => _focusNode.requestFocus()); - } - @override void dispose() { _searchController.dispose(); @@ -167,14 +180,9 @@ class _SearchPageState extends State { @override Widget build(BuildContext context) { final colors = Theme.of(context).colorScheme; - return Scaffold( - backgroundColor: colors.surface, - appBar: AppBar( - title: const Text('搜索'), - elevation: 0, - scrolledUnderElevation: 0, - ), - body: Column(children: [ + return Material( + color: colors.surface, + child: Column(children: [ _buildSearchBar(), _buildFilterRow(), Expanded( @@ -239,7 +247,7 @@ class _SearchPageState extends State { const SizedBox(width: 8), Expanded(child: _filterChip('书籍', Icons.menu_book_outlined, _showBooks, bookCount, () { setState(() { _showBooks = !_showBooks; _performSearch(); }); })), const SizedBox(width: 8), - Expanded(child: _filterChip('笔记', Icons.note_outlined, _showNotes, noteCount, () { setState(() { _showNotes = !_showNotes; _performSearch(); }); })), + Expanded(child: _filterChip('笔记', Icons.sticky_note_2_outlined, _showNotes, noteCount, () { setState(() { _showNotes = !_showNotes; _performSearch(); }); })), const SizedBox(width: 8), Expanded(child: _filterChip('游戏', Icons.sports_esports_outlined, _showGames, gameCount, () { setState(() { _showGames = !_showGames; _performSearch(); }); })), ]), diff --git a/lib/pages/profile/feature_settings_page.dart b/lib/pages/profile/feature_settings_page.dart index 8df8631..ec16470 100644 --- a/lib/pages/profile/feature_settings_page.dart +++ b/lib/pages/profile/feature_settings_page.dart @@ -82,7 +82,7 @@ class _FeatureSettingsPageState extends State { all.addAll([ (0, '影视', Icons.movie_outlined), (1, '阅读', Icons.menu_book_outlined), - (2, '笔记', Icons.note_outlined), + (2, '笔记', Icons.sticky_note_2_outlined), (3, '游戏', Icons.sports_esports_outlined), ].where((t) { return switch (t.$1) { @@ -196,7 +196,7 @@ class _FeatureSettingsPageState extends State { indent: 24, endIndent: 24, color: colors.outlineVariant), - _buildSwitchItem(Icons.note_outlined, '笔记', '记录和管理笔记', _showNoteTab, + _buildSwitchItem(Icons.sticky_note_2_outlined, '笔记', '记录和管理笔记', _showNoteTab, _toggleNoteTab), Divider( height: 0.5, diff --git a/lib/pages/profile/layout_settings_page.dart b/lib/pages/profile/layout_settings_page.dart index 1e42877..17cfaa6 100644 --- a/lib/pages/profile/layout_settings_page.dart +++ b/lib/pages/profile/layout_settings_page.dart @@ -75,7 +75,7 @@ class _LayoutSettingsPageState extends State { onTap: _showBookSheet, ), _buildCategoryTile( - icon: Icons.note_outlined, + icon: Icons.sticky_note_2_outlined, title: '笔记', color: colors.primary, subtitle: _noteSubtitle, diff --git a/lib/pages/settings/tag_management_page.dart b/lib/pages/settings/tag_management_page.dart index 515ee05..57ee1d9 100644 --- a/lib/pages/settings/tag_management_page.dart +++ b/lib/pages/settings/tag_management_page.dart @@ -17,7 +17,7 @@ class _TagManagementPageState extends State { static const _tabTypes = ['movie_genre', 'book_genre', 'note_tag', 'game_genre']; static const _typeLabels = ['影视类型', '书籍类型', '笔记标签', '游戏类型']; - static const _typeIcons = [Icons.movie_outlined, Icons.menu_book_outlined, Icons.note_outlined, Icons.sports_esports_outlined]; + static const _typeIcons = [Icons.movie_outlined, Icons.menu_book_outlined, Icons.sticky_note_2_outlined, Icons.sports_esports_outlined]; final Map>> _tagCache = {}; Map _usageCounts = {}; diff --git a/lib/utils/user_prefs.dart b/lib/utils/user_prefs.dart index 4d02f1d..242c561 100644 --- a/lib/utils/user_prefs.dart +++ b/lib/utils/user_prefs.dart @@ -284,6 +284,10 @@ class UserPrefs { bool get enhancedSearchEnabled => prefs.getBool('enhancedSearchEnabled') ?? false; Future setEnhancedSearchEnabled(bool value) => prefs.setBool('enhancedSearchEnabled', value); + /// 上次使用的搜索模式:false=本地, true=增强 + bool get lastSearchOnline => prefs.getBool('lastSearchOnline') ?? false; + Future setLastSearchOnline(bool value) => prefs.setBool('lastSearchOnline', value); + /// 影视增强搜索 Token String get movieSearchToken => prefs.getString('movieSearchToken') ?? ''; Future setMovieSearchToken(String value) => prefs.setString('movieSearchToken', value); diff --git a/lib/widgets/add_sheet.dart b/lib/widgets/add_sheet.dart index 29fa520..082a05c 100644 --- a/lib/widgets/add_sheet.dart +++ b/lib/widgets/add_sheet.dart @@ -72,7 +72,7 @@ void showAddSheet(BuildContext context, AppProvider provider) { if (userPrefs.showNoteTab) { options.add(_buildOption( colors: colors, - icon: Icons.note_outlined, + icon: Icons.sticky_note_2_outlined, title: '添加笔记', subtitle: '记录你的想法和笔记', onTap: () { diff --git a/lib/widgets/add_type_selector.dart b/lib/widgets/add_type_selector.dart index e9839dc..c82de58 100644 --- a/lib/widgets/add_type_selector.dart +++ b/lib/widgets/add_type_selector.dart @@ -35,7 +35,7 @@ class _AddTypeDialog extends StatelessWidget { final types = <_AddTypeItem>[]; if (showMovie) types.add(_AddTypeItem('影视', Icons.movie_outlined, 0)); if (showBook) types.add(_AddTypeItem('阅读', Icons.menu_book_outlined, 1)); - if (showNote) types.add(_AddTypeItem('笔记', Icons.note_outlined, 2)); + if (showNote) types.add(_AddTypeItem('笔记', Icons.sticky_note_2_outlined, 2)); if (showGame) types.add(_AddTypeItem('游戏', Icons.sports_esports_outlined, 3)); return Dialog( diff --git a/lib/widgets/custom_drawer.dart b/lib/widgets/custom_drawer.dart index bf79ab7..232e0a2 100644 --- a/lib/widgets/custom_drawer.dart +++ b/lib/widgets/custom_drawer.dart @@ -172,7 +172,7 @@ class _CustomDrawerState extends State { final statItems = <(IconData, int, String, Color)>[]; if (userPrefs.showMovieTab) statItems.add((Icons.movie_outlined, movieCount, '观影', const Color(0xFF2563EB))); if (userPrefs.showBookTab) statItems.add((Icons.menu_book_outlined, bookCount, '阅读', const Color(0xFF16A34A))); - if (userPrefs.showNoteTab) statItems.add((Icons.note_outlined, noteCount, '笔记', const Color(0xFF9333EA))); + if (userPrefs.showNoteTab) statItems.add((Icons.sticky_note_2_outlined, noteCount, '笔记', const Color(0xFF9333EA))); if (userPrefs.showGameTab) statItems.add((Icons.sports_esports_outlined, gameCount, '游戏', const Color(0xFFEA580C))); return Container( @@ -657,7 +657,7 @@ class _CustomDrawerState extends State { for (final b in dayBooks) _dayDetailItem(ctx, Icons.menu_book_outlined, b.title, const Color(0xFF16A34A)), ], if (dayNotes.isNotEmpty) ...[ - for (final n in dayNotes) _dayDetailItem(ctx, Icons.note_outlined, n.title.isNotEmpty ? n.title : '随手记', const Color(0xFF9333EA)), + for (final n in dayNotes) _dayDetailItem(ctx, Icons.sticky_note_2_outlined, n.title.isNotEmpty ? n.title : '随手记', const Color(0xFF9333EA)), ], if (dayGames.isNotEmpty) ...[ for (final g in dayGames) _dayDetailItem(ctx, Icons.sports_esports_outlined, g.title, const Color(0xFFEA580C)), @@ -803,7 +803,7 @@ class _CustomDrawerState extends State { borderRadius: BorderRadius.circular(5), ), child: Icon( - item.type == 'movie' ? Icons.movie_outlined : item.type == 'book' ? Icons.menu_book_outlined : item.type == 'game' ? Icons.sports_esports_outlined : Icons.note_outlined, + item.type == 'movie' ? Icons.movie_outlined : item.type == 'book' ? Icons.menu_book_outlined : item.type == 'game' ? Icons.sports_esports_outlined : Icons.sticky_note_2_outlined, size: 12, color: _typeColor(item.type), ), );