mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
feat(mobile): Facial recognition (#2507)
* Add API service * Added service, provider * merge main * update pubspec * styling * dev: add person search result page * dev: display person asset on page * dev: add rename form * style form * dev: mechanism to add name to faces * styling * fix bad merge * update api * test * revert * Add header widget * change name * show all people page * fix test * pr feedback * Add name to app bar * feedback * styling
This commit is contained in:
parent
00f65a53dd
commit
0d0866d5d9
20 changed files with 964 additions and 231 deletions
mobile/lib/routing
|
@ -84,6 +84,7 @@ class _$AppRouter extends RootStackRouter {
|
|||
onVideoEnded: args.onVideoEnded,
|
||||
onPlaying: args.onPlaying,
|
||||
onPaused: args.onPaused,
|
||||
placeholder: args.placeholder,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
@ -272,6 +273,23 @@ class _$AppRouter extends RootStackRouter {
|
|||
),
|
||||
);
|
||||
},
|
||||
PersonResultRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<PersonResultRouteArgs>();
|
||||
return MaterialPageX<dynamic>(
|
||||
routeData: routeData,
|
||||
child: PersonResultPage(
|
||||
key: args.key,
|
||||
personId: args.personId,
|
||||
personName: args.personName,
|
||||
),
|
||||
);
|
||||
},
|
||||
AllPeopleRoute.name: (routeData) {
|
||||
return MaterialPageX<dynamic>(
|
||||
routeData: routeData,
|
||||
child: const AllPeoplePage(),
|
||||
);
|
||||
},
|
||||
HomeRoute.name: (routeData) {
|
||||
return MaterialPageX<dynamic>(
|
||||
routeData: routeData,
|
||||
|
@ -555,6 +573,22 @@ class _$AppRouter extends RootStackRouter {
|
|||
duplicateGuard,
|
||||
],
|
||||
),
|
||||
RouteConfig(
|
||||
PersonResultRoute.name,
|
||||
path: '/person-result-page',
|
||||
guards: [
|
||||
authGuard,
|
||||
duplicateGuard,
|
||||
],
|
||||
),
|
||||
RouteConfig(
|
||||
AllPeopleRoute.name,
|
||||
path: '/all-people-page',
|
||||
guards: [
|
||||
authGuard,
|
||||
duplicateGuard,
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -670,9 +704,10 @@ class VideoViewerRoute extends PageRouteInfo<VideoViewerRouteArgs> {
|
|||
Key? key,
|
||||
required Asset asset,
|
||||
required bool isMotionVideo,
|
||||
required dynamic onVideoEnded,
|
||||
dynamic onPlaying,
|
||||
dynamic onPaused,
|
||||
required void Function() onVideoEnded,
|
||||
void Function()? onPlaying,
|
||||
void Function()? onPaused,
|
||||
Widget? placeholder,
|
||||
}) : super(
|
||||
VideoViewerRoute.name,
|
||||
path: '/video-viewer-page',
|
||||
|
@ -683,6 +718,7 @@ class VideoViewerRoute extends PageRouteInfo<VideoViewerRouteArgs> {
|
|||
onVideoEnded: onVideoEnded,
|
||||
onPlaying: onPlaying,
|
||||
onPaused: onPaused,
|
||||
placeholder: placeholder,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -697,6 +733,7 @@ class VideoViewerRouteArgs {
|
|||
required this.onVideoEnded,
|
||||
this.onPlaying,
|
||||
this.onPaused,
|
||||
this.placeholder,
|
||||
});
|
||||
|
||||
final Key? key;
|
||||
|
@ -705,15 +742,17 @@ class VideoViewerRouteArgs {
|
|||
|
||||
final bool isMotionVideo;
|
||||
|
||||
final dynamic onVideoEnded;
|
||||
final void Function() onVideoEnded;
|
||||
|
||||
final dynamic onPlaying;
|
||||
final void Function()? onPlaying;
|
||||
|
||||
final dynamic onPaused;
|
||||
final void Function()? onPaused;
|
||||
|
||||
final Widget? placeholder;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'VideoViewerRouteArgs{key: $key, asset: $asset, isMotionVideo: $isMotionVideo, onVideoEnded: $onVideoEnded, onPlaying: $onPlaying, onPaused: $onPaused}';
|
||||
return 'VideoViewerRouteArgs{key: $key, asset: $asset, isMotionVideo: $isMotionVideo, onVideoEnded: $onVideoEnded, onPlaying: $onPlaying, onPaused: $onPaused, placeholder: $placeholder}';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1191,6 +1230,57 @@ class PartnerDetailRouteArgs {
|
|||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [PersonResultPage]
|
||||
class PersonResultRoute extends PageRouteInfo<PersonResultRouteArgs> {
|
||||
PersonResultRoute({
|
||||
Key? key,
|
||||
required String personId,
|
||||
required String personName,
|
||||
}) : super(
|
||||
PersonResultRoute.name,
|
||||
path: '/person-result-page',
|
||||
args: PersonResultRouteArgs(
|
||||
key: key,
|
||||
personId: personId,
|
||||
personName: personName,
|
||||
),
|
||||
);
|
||||
|
||||
static const String name = 'PersonResultRoute';
|
||||
}
|
||||
|
||||
class PersonResultRouteArgs {
|
||||
const PersonResultRouteArgs({
|
||||
this.key,
|
||||
required this.personId,
|
||||
required this.personName,
|
||||
});
|
||||
|
||||
final Key? key;
|
||||
|
||||
final String personId;
|
||||
|
||||
final String personName;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PersonResultRouteArgs{key: $key, personId: $personId, personName: $personName}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [AllPeoplePage]
|
||||
class AllPeopleRoute extends PageRouteInfo<void> {
|
||||
const AllPeopleRoute()
|
||||
: super(
|
||||
AllPeopleRoute.name,
|
||||
path: '/all-people-page',
|
||||
);
|
||||
|
||||
static const String name = 'AllPeopleRoute';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [HomePage]
|
||||
class HomeRoute extends PageRouteInfo<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue