From bee7cd9683819c579856cef380f90f2d8077e4b5 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 11 Sep 2024 11:22:51 -0500 Subject: [PATCH] add albums to dedicated item menu --- .../lib/pages/common/tab_controller.page.dart | 21 ++++++++++++++++++- mobile/lib/routing/router.dart | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/mobile/lib/pages/common/tab_controller.page.dart b/mobile/lib/pages/common/tab_controller.page.dart index 234ec1153e9e8..33faf101b6e15 100644 --- a/mobile/lib/pages/common/tab_controller.page.dart +++ b/mobile/lib/pages/common/tab_controller.page.dart @@ -98,6 +98,12 @@ class TabControllerPage extends HookConsumerWidget { padding: const EdgeInsets.all(4), icon: const Icon(Icons.photo_album_outlined), selectedIcon: const Icon(Icons.photo_album), + label: const Text('albums').tr(), + ), + NavigationRailDestination( + padding: const EdgeInsets.all(4), + icon: const Icon(Icons.space_dashboard_outlined), + selectedIcon: const Icon(Icons.space_dashboard_rounded), label: const Text('collections').tr(), ), ], @@ -163,7 +169,7 @@ class TabControllerPage extends HookConsumerWidget { // ), // ), NavigationDestination( - label: 'collections'.tr(), + label: 'albums'.tr(), icon: const Icon( Icons.photo_album_outlined, ), @@ -174,6 +180,18 @@ class TabControllerPage extends HookConsumerWidget { ), ), ), + NavigationDestination( + label: 'collections'.tr(), + icon: const Icon( + Icons.space_dashboard_outlined, + ), + selectedIcon: buildIcon( + Icon( + Icons.space_dashboard_rounded, + color: context.primaryColor, + ), + ), + ), ], ); } @@ -185,6 +203,7 @@ class TabControllerPage extends HookConsumerWidget { SearchRoute(), // SharingRoute(), // LibraryRoute(), + AlbumsCollectionRoute(), CollectionsRoute(), ], duration: const Duration(milliseconds: 600), diff --git a/mobile/lib/routing/router.dart b/mobile/lib/routing/router.dart index 4521442fb5940..7705de009aa65 100644 --- a/mobile/lib/routing/router.dart +++ b/mobile/lib/routing/router.dart @@ -123,6 +123,10 @@ class AppRouter extends RootStackRouter { page: CollectionsRoute.page, guards: [_authGuard, _duplicateGuard], ), + AutoRoute( + page: AlbumsCollectionRoute.page, + guards: [_authGuard, _duplicateGuard], + ), ], transitionsBuilder: TransitionsBuilders.fadeIn, ),