mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web, mobile): Options to show archived assets in map (#4293)
* Add include archive setting to map on web * open api * better naming for web isArchived variable * add withArchived setting to mobile * (e2e): tests for mapMarker endpoint and isArchived * isArchived to mobile * chore: cleanup test * chore: optimize e2e --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
e5b4d09827
commit
e571880c16
22 changed files with 184 additions and 34 deletions
|
|
@ -13,6 +13,7 @@ class MapSettingsDialog extends HookConsumerWidget {
|
|||
final mapSettings = ref.read(mapStateNotifier);
|
||||
final isDarkMode = useState(mapSettings.isDarkTheme);
|
||||
final showFavoriteOnly = useState(mapSettings.showFavoriteOnly);
|
||||
final showIncludeArchived = useState(mapSettings.includeArchived);
|
||||
final showRelativeDate = useState(mapSettings.relativeTime);
|
||||
final ThemeData theme = Theme.of(context);
|
||||
|
||||
|
|
@ -48,6 +49,22 @@ class MapSettingsDialog extends HookConsumerWidget {
|
|||
);
|
||||
}
|
||||
|
||||
Widget buildIncludeArchivedSetting() {
|
||||
return SwitchListTile.adaptive(
|
||||
value: showIncludeArchived.value,
|
||||
onChanged: (value) {
|
||||
showIncludeArchived.value = value;
|
||||
},
|
||||
activeColor: theme.primaryColor,
|
||||
dense: true,
|
||||
title: Text(
|
||||
"map_settings_include_show_archived".tr(),
|
||||
style:
|
||||
theme.textTheme.labelLarge?.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildDateRangeSetting() {
|
||||
final now = DateTime.now();
|
||||
return DropdownMenu(
|
||||
|
|
@ -127,6 +144,8 @@ class MapSettingsDialog extends HookConsumerWidget {
|
|||
mapSettingsNotifier.switchTheme(isDarkMode.value);
|
||||
mapSettingsNotifier.switchFavoriteOnly(showFavoriteOnly.value);
|
||||
mapSettingsNotifier.setRelativeTime(showRelativeDate.value);
|
||||
mapSettingsNotifier
|
||||
.switchIncludeArchived(showIncludeArchived.value);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
|
|
@ -166,6 +185,7 @@ class MapSettingsDialog extends HookConsumerWidget {
|
|||
children: [
|
||||
buildMapThemeSetting(),
|
||||
buildFavoriteOnlySetting(),
|
||||
buildIncludeArchivedSetting(),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue