style(mobile): asset selection animation (#5322)

* refactor: replace navigator.pop with context.pop

* mobile: use demo instance credentials for test login

* style(mobile): centre align add partner button

* mobile: add thumbnail selection animation

* differnt gesture for test instance

---------

Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
shenlong
2023-11-28 22:05:13 +00:00
committed by GitHub
parent 6522707b49
commit b0db8ed6c4
10 changed files with 41 additions and 29 deletions

View File

@@ -65,7 +65,7 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
}
ref.invalidate(albumDetailProvider(album.id));
Navigator.pop(context);
context.pop();
}
return Card(

View File

@@ -89,7 +89,7 @@ class AlbumViewerAppbar extends HookConsumerWidget
),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.pop(context, 'Cancel'),
onPressed: () => context.pop('Cancel'),
child: Text(
'Cancel',
style: TextStyle(
@@ -100,7 +100,7 @@ class AlbumViewerAppbar extends HookConsumerWidget
),
TextButton(
onPressed: () {
Navigator.pop(context, 'Confirm');
context.pop('Confirm');
deleteAlbum();
},
child: Text(
@@ -131,7 +131,7 @@ class AlbumViewerAppbar extends HookConsumerWidget
context
.autoNavigate(const TabControllerRoute(children: [SharingRoute()]));
} else {
Navigator.pop(context);
context.pop();
ImmichToast.show(
context: context,
msg: "album_viewer_appbar_share_err_leave".tr(),
@@ -153,12 +153,12 @@ class AlbumViewerAppbar extends HookConsumerWidget
);
if (isSuccess) {
Navigator.pop(context);
context.pop();
selectionDisabled();
ref.watch(albumProvider.notifier).getAllAlbums();
ref.invalidate(albumDetailProvider(album.id));
} else {
Navigator.pop(context);
context.pop();
ImmichToast.show(
context: context,
msg: "album_viewer_appbar_share_err_remove".tr(),
@@ -253,7 +253,7 @@ class AlbumViewerAppbar extends HookConsumerWidget
ListTile(
leading: const Icon(Icons.person_add_alt_rounded),
onTap: () {
Navigator.pop(context);
context.pop();
onAddUsers!(album);
},
title: const Text(
@@ -265,7 +265,7 @@ class AlbumViewerAppbar extends HookConsumerWidget
leading: const Icon(Icons.share_rounded),
onTap: () {
context.autoPush(SharedLinkEditRoute(albumId: album.remoteId));
Navigator.pop(context);
context.pop();
},
title: const Text(
"control_bottom_app_bar_share",
@@ -286,7 +286,7 @@ class AlbumViewerAppbar extends HookConsumerWidget
ListTile(
leading: const Icon(Icons.add_photo_alternate_outlined),
onTap: () {
Navigator.pop(context);
context.pop();
onAddPhotos!(album);
},
title: const Text(

View File

@@ -27,7 +27,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
final isOwner = owner?.id == userId;
void showErrorMessage() {
Navigator.pop(context);
context.pop();
ImmichToast.show(
context: context,
msg: "shared_album_section_people_action_error".tr(),
@@ -70,7 +70,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
showErrorMessage();
}
Navigator.pop(context);
context.pop();
ImmichLoadingOverlayController.appLoader.hide();
}