mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	feat(mobile): Library page rework (album sorting, favorites) (#1501)
* Add album sorting * Change AppBar to match photos page behaviour * Add buttons * First crude implementation of the favorites page * Clean up * Add favorite button * i18n * Add star indicator to thumbnail * Add favorite logic to separate provider and fix favorite behavior in album * Review feedback (Add isFavorite variable) * dev: style buttons * dev: styled drop down button --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
		@@ -15,6 +15,7 @@ import 'package:immich_mobile/modules/backup/views/album_preview_page.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/backup/views/backup_album_selection_page.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/backup/views/backup_controller_page.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/backup/views/failed_backup_status_page.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/favorite/views/favorites_page.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/home/views/home_page.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/login/views/change_password_page.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/login/views/login_page.dart';
 | 
			
		||||
@@ -55,6 +56,7 @@ part 'router.gr.dart';
 | 
			
		||||
    AutoRoute(page: BackupControllerPage, guards: [AuthGuard]),
 | 
			
		||||
    AutoRoute(page: SearchResultPage, guards: [AuthGuard]),
 | 
			
		||||
    AutoRoute(page: CreateAlbumPage, guards: [AuthGuard]),
 | 
			
		||||
    AutoRoute(page: FavoritesPage, guards: [AuthGuard]),
 | 
			
		||||
    CustomRoute<AssetSelectionPageResult?>(
 | 
			
		||||
      page: AssetSelectionPage,
 | 
			
		||||
      guards: [AuthGuard],
 | 
			
		||||
 
 | 
			
		||||
@@ -77,6 +77,10 @@ class _$AppRouter extends RootStackRouter {
 | 
			
		||||
              isSharedAlbum: args.isSharedAlbum,
 | 
			
		||||
              initialAssets: args.initialAssets));
 | 
			
		||||
    },
 | 
			
		||||
    FavoritesRoute.name: (routeData) {
 | 
			
		||||
      return MaterialPageX<dynamic>(
 | 
			
		||||
          routeData: routeData, child: const FavoritesPage());
 | 
			
		||||
    },
 | 
			
		||||
    AssetSelectionRoute.name: (routeData) {
 | 
			
		||||
      return CustomPage<AssetSelectionPageResult?>(
 | 
			
		||||
          routeData: routeData,
 | 
			
		||||
@@ -197,6 +201,8 @@ class _$AppRouter extends RootStackRouter {
 | 
			
		||||
            path: '/search-result-page', guards: [authGuard]),
 | 
			
		||||
        RouteConfig(CreateAlbumRoute.name,
 | 
			
		||||
            path: '/create-album-page', guards: [authGuard]),
 | 
			
		||||
        RouteConfig(FavoritesRoute.name,
 | 
			
		||||
            path: '/favorites-page', guards: [authGuard]),
 | 
			
		||||
        RouteConfig(AssetSelectionRoute.name,
 | 
			
		||||
            path: '/asset-selection-page', guards: [authGuard]),
 | 
			
		||||
        RouteConfig(SelectUserForSharingRoute.name,
 | 
			
		||||
@@ -386,6 +392,14 @@ class CreateAlbumRouteArgs {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// generated route for
 | 
			
		||||
/// [FavoritesPage]
 | 
			
		||||
class FavoritesRoute extends PageRouteInfo<void> {
 | 
			
		||||
  const FavoritesRoute() : super(FavoritesRoute.name, path: '/favorites-page');
 | 
			
		||||
 | 
			
		||||
  static const String name = 'FavoritesRoute';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// generated route for
 | 
			
		||||
/// [AssetSelectionPage]
 | 
			
		||||
class AssetSelectionRoute extends PageRouteInfo<void> {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user