mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(mobile): Archive feature on mobile (#2258)
* update asset to include isArchive property * Not display archived assets on timeline * replace share button to archive button * Added archive page * Add bottom nav bar * clean up homepage * remove deadcode * improve on sync is archive * show archive asset correctly * better merge condition * Added back renderList to re-rendering don't jump around * Better way to handle showing archive assets * complete ArchiveSelectionNotifier * toggle archive * remove deadcode * fix unit tests * update assets in DB when changing assets * update asset state to reflect archived status * allow to archive assets via multi-select from timeline * fixed logic * Add options to bulk unarchive * regenerate api * Change position of toast message --------- Co-authored-by: Fynn Petersen-Frey <zoodyy@users.noreply.github.com>
This commit is contained in:
@@ -51,14 +51,14 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
|
||||
ImmichToast.show(
|
||||
context: context,
|
||||
msg: 'add_to_album_bottom_sheet_already_exists'.tr(
|
||||
namedArgs: { "album": album.name },
|
||||
namedArgs: {"album": album.name},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
ImmichToast.show(
|
||||
context: context,
|
||||
msg: 'add_to_album_bottom_sheet_added'.tr(
|
||||
namedArgs: { "album": album.name },
|
||||
namedArgs: {"album": album.name},
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -71,6 +71,7 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
return Card(
|
||||
elevation: 0,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(15),
|
||||
@@ -99,8 +100,15 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
|
||||
style: Theme.of(context).textTheme.displayMedium,
|
||||
),
|
||||
TextButton.icon(
|
||||
icon: const Icon(Icons.add),
|
||||
label: Text('common_create_new_album'.tr()),
|
||||
icon: Icon(
|
||||
Icons.add,
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
label: Text(
|
||||
'common_create_new_album'.tr(),
|
||||
style:
|
||||
TextStyle(color: Theme.of(context).primaryColor),
|
||||
),
|
||||
onPressed: () {
|
||||
ref
|
||||
.watch(assetSelectionProvider.notifier)
|
||||
|
||||
@@ -43,7 +43,8 @@ class LibraryPage extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
|
||||
final selectedAlbumSortOrder = useState(settings.getSetting(AppSettingsEnum.selectedAlbumSortOrder));
|
||||
final selectedAlbumSortOrder =
|
||||
useState(settings.getSetting(AppSettingsEnum.selectedAlbumSortOrder));
|
||||
|
||||
List<Album> sortedAlbums() {
|
||||
if (selectedAlbumSortOrder.value == 0) {
|
||||
@@ -179,13 +180,13 @@ class LibraryPage extends HookConsumerWidget {
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12.0,
|
||||
color: isDarkMode ? Colors.white : Colors.black,
|
||||
fontSize: 13.0,
|
||||
color: isDarkMode ? Colors.white : Colors.grey[800],
|
||||
),
|
||||
),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
padding: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||
backgroundColor: isDarkMode ? Colors.grey[900] : Colors.grey[50],
|
||||
side: BorderSide(
|
||||
color: isDarkMode ? Colors.grey[800]! : Colors.grey[300]!,
|
||||
@@ -225,8 +226,8 @@ class LibraryPage extends HookConsumerWidget {
|
||||
}),
|
||||
const SizedBox(width: 12.0),
|
||||
buildLibraryNavButton(
|
||||
"library_page_sharing".tr(), Icons.group_outlined, () {
|
||||
AutoRouter.of(context).navigate(const SharingRoute());
|
||||
"library_page_archive".tr(), Icons.archive_outlined, () {
|
||||
AutoRouter.of(context).navigate(const ArchiveRoute());
|
||||
}),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user