mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
feat(mobile): memories (#2988)
* Add page view * Nice page view * refactor file structure * Added card * invalidating data * transition * styling * correct styleing * refactor * click to navigate * styling * TODO * clean up * clean up * pr feedback * pr feedback * better loading indicator
This commit is contained in:
parent
0e8d235148
commit
39a885a37c
17 changed files with 532 additions and 2 deletions
mobile/lib/routing
|
@ -290,6 +290,17 @@ class _$AppRouter extends RootStackRouter {
|
|||
child: const AllPeoplePage(),
|
||||
);
|
||||
},
|
||||
VerticalRouteView.name: (routeData) {
|
||||
final args = routeData.argsAs<VerticalRouteViewArgs>();
|
||||
return MaterialPageX<dynamic>(
|
||||
routeData: routeData,
|
||||
child: MemoryPage(
|
||||
memories: args.memories,
|
||||
memoryIndex: args.memoryIndex,
|
||||
key: args.key,
|
||||
),
|
||||
);
|
||||
},
|
||||
HomeRoute.name: (routeData) {
|
||||
return MaterialPageX<dynamic>(
|
||||
routeData: routeData,
|
||||
|
@ -589,6 +600,14 @@ class _$AppRouter extends RootStackRouter {
|
|||
duplicateGuard,
|
||||
],
|
||||
),
|
||||
RouteConfig(
|
||||
VerticalRouteView.name,
|
||||
path: '/vertical-page-view',
|
||||
guards: [
|
||||
authGuard,
|
||||
duplicateGuard,
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -1281,6 +1300,45 @@ class AllPeopleRoute extends PageRouteInfo<void> {
|
|||
static const String name = 'AllPeopleRoute';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [MemoryPage]
|
||||
class VerticalRouteView extends PageRouteInfo<VerticalRouteViewArgs> {
|
||||
VerticalRouteView({
|
||||
required List<Memory> memories,
|
||||
required int memoryIndex,
|
||||
Key? key,
|
||||
}) : super(
|
||||
VerticalRouteView.name,
|
||||
path: '/vertical-page-view',
|
||||
args: VerticalRouteViewArgs(
|
||||
memories: memories,
|
||||
memoryIndex: memoryIndex,
|
||||
key: key,
|
||||
),
|
||||
);
|
||||
|
||||
static const String name = 'VerticalRouteView';
|
||||
}
|
||||
|
||||
class VerticalRouteViewArgs {
|
||||
const VerticalRouteViewArgs({
|
||||
required this.memories,
|
||||
required this.memoryIndex,
|
||||
this.key,
|
||||
});
|
||||
|
||||
final List<Memory> memories;
|
||||
|
||||
final int memoryIndex;
|
||||
|
||||
final Key? key;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'VerticalRouteViewArgs{memories: $memories, memoryIndex: $memoryIndex, key: $key}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [HomePage]
|
||||
class HomeRoute extends PageRouteInfo<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue