mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
feat(mobile): shared album activities (#4833)
* fix(server): global activity like duplicate search * mobile: user_circle_avatar - fallback to text icon if no profile pic available * mobile: use favourite icon in search "your activity" * feat(mobile): shared album activities * mobile: align hearts with user profile icon * styling * replace bottom sheet with dismissible * add auto focus to the input --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
c74ea7282a
commit
26fd9d7e5f
20 changed files with 890 additions and 15 deletions
mobile/lib/routing
|
@ -73,6 +73,7 @@ class _$AppRouter extends RootStackRouter {
|
|||
heroOffset: args.heroOffset,
|
||||
showStack: args.showStack,
|
||||
isOwner: args.isOwner,
|
||||
sharedAlbumId: args.sharedAlbumId,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
@ -337,6 +338,24 @@ class _$AppRouter extends RootStackRouter {
|
|||
),
|
||||
);
|
||||
},
|
||||
ActivitiesRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<ActivitiesRouteArgs>();
|
||||
return CustomPage<dynamic>(
|
||||
routeData: routeData,
|
||||
child: ActivitiesPage(
|
||||
args.albumId,
|
||||
appBarTitle: args.appBarTitle,
|
||||
assetId: args.assetId,
|
||||
withAssetThumbs: args.withAssetThumbs,
|
||||
isOwner: args.isOwner,
|
||||
key: args.key,
|
||||
),
|
||||
transitionsBuilder: TransitionsBuilders.slideLeft,
|
||||
durationInMilliseconds: 200,
|
||||
opaque: true,
|
||||
barrierDismissible: false,
|
||||
);
|
||||
},
|
||||
HomeRoute.name: (routeData) {
|
||||
return MaterialPageX<dynamic>(
|
||||
routeData: routeData,
|
||||
|
@ -674,6 +693,14 @@ class _$AppRouter extends RootStackRouter {
|
|||
duplicateGuard,
|
||||
],
|
||||
),
|
||||
RouteConfig(
|
||||
ActivitiesRoute.name,
|
||||
path: '/activities-page',
|
||||
guards: [
|
||||
authGuard,
|
||||
duplicateGuard,
|
||||
],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -749,6 +776,7 @@ class GalleryViewerRoute extends PageRouteInfo<GalleryViewerRouteArgs> {
|
|||
int heroOffset = 0,
|
||||
bool showStack = false,
|
||||
bool isOwner = true,
|
||||
String? sharedAlbumId,
|
||||
}) : super(
|
||||
GalleryViewerRoute.name,
|
||||
path: '/gallery-viewer-page',
|
||||
|
@ -760,6 +788,7 @@ class GalleryViewerRoute extends PageRouteInfo<GalleryViewerRouteArgs> {
|
|||
heroOffset: heroOffset,
|
||||
showStack: showStack,
|
||||
isOwner: isOwner,
|
||||
sharedAlbumId: sharedAlbumId,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -775,6 +804,7 @@ class GalleryViewerRouteArgs {
|
|||
this.heroOffset = 0,
|
||||
this.showStack = false,
|
||||
this.isOwner = true,
|
||||
this.sharedAlbumId,
|
||||
});
|
||||
|
||||
final Key? key;
|
||||
|
@ -791,9 +821,11 @@ class GalleryViewerRouteArgs {
|
|||
|
||||
final bool isOwner;
|
||||
|
||||
final String? sharedAlbumId;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GalleryViewerRouteArgs{key: $key, initialIndex: $initialIndex, loadAsset: $loadAsset, totalAssets: $totalAssets, heroOffset: $heroOffset, showStack: $showStack, isOwner: $isOwner}';
|
||||
return 'GalleryViewerRouteArgs{key: $key, initialIndex: $initialIndex, loadAsset: $loadAsset, totalAssets: $totalAssets, heroOffset: $heroOffset, showStack: $showStack, isOwner: $isOwner, sharedAlbumId: $sharedAlbumId}';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1527,6 +1559,60 @@ class SharedLinkEditRouteArgs {
|
|||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [ActivitiesPage]
|
||||
class ActivitiesRoute extends PageRouteInfo<ActivitiesRouteArgs> {
|
||||
ActivitiesRoute({
|
||||
required String albumId,
|
||||
String appBarTitle = "",
|
||||
String? assetId,
|
||||
bool withAssetThumbs = true,
|
||||
bool isOwner = false,
|
||||
Key? key,
|
||||
}) : super(
|
||||
ActivitiesRoute.name,
|
||||
path: '/activities-page',
|
||||
args: ActivitiesRouteArgs(
|
||||
albumId: albumId,
|
||||
appBarTitle: appBarTitle,
|
||||
assetId: assetId,
|
||||
withAssetThumbs: withAssetThumbs,
|
||||
isOwner: isOwner,
|
||||
key: key,
|
||||
),
|
||||
);
|
||||
|
||||
static const String name = 'ActivitiesRoute';
|
||||
}
|
||||
|
||||
class ActivitiesRouteArgs {
|
||||
const ActivitiesRouteArgs({
|
||||
required this.albumId,
|
||||
this.appBarTitle = "",
|
||||
this.assetId,
|
||||
this.withAssetThumbs = true,
|
||||
this.isOwner = false,
|
||||
this.key,
|
||||
});
|
||||
|
||||
final String albumId;
|
||||
|
||||
final String appBarTitle;
|
||||
|
||||
final String? assetId;
|
||||
|
||||
final bool withAssetThumbs;
|
||||
|
||||
final bool isOwner;
|
||||
|
||||
final Key? key;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ActivitiesRouteArgs{albumId: $albumId, appBarTitle: $appBarTitle, assetId: $assetId, withAssetThumbs: $withAssetThumbs, isOwner: $isOwner, key: $key}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [HomePage]
|
||||
class HomeRoute extends PageRouteInfo<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue