mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 22:51:59 +00:00
refactor(mobile): pages (#9246)
* refactor(mobile): pages * refactor * album pages * pages * pages * use *.page.dart * representation * put back module
This commit is contained in:
parent
398d99a052
commit
090592e5ae
73 changed files with 166 additions and 165 deletions
|
@ -8,10 +8,10 @@ import 'package:immich_mobile/providers/activity_statistics.provider.dart';
|
|||
import 'package:immich_mobile/providers/album/album.provider.dart';
|
||||
import 'package:immich_mobile/providers/album/album_viewer.provider.dart';
|
||||
import 'package:immich_mobile/providers/album/shared_album.provider.dart';
|
||||
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
import 'package:immich_mobile/entities/album.entity.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
||||
|
||||
class AlbumViewerAppbar extends HookConsumerWidget
|
||||
implements PreferredSizeWidget {
|
||||
|
|
|
@ -8,7 +8,7 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
|||
import 'package:immich_mobile/providers/map/map_state.provider.dart';
|
||||
import 'package:immich_mobile/modules/map/widgets/map_settings_sheet.dart';
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/utils/selection_handlers.dart';
|
||||
|
||||
class MapAppBar extends HookWidget implements PreferredSizeWidget {
|
||||
|
|
|
@ -3,8 +3,8 @@ import 'dart:ui';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/modules/asset_viewer/views/video_viewer_page.dart';
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/pages/common/video_viewer.page.dart';
|
||||
import 'package:immich_mobile/shared/ui/hooks/blurhash_hook.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_image.dart';
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/modules/settings/views/settings_page.dart';
|
||||
|
||||
@RoutePage()
|
||||
class SettingsSubPage extends StatelessWidget {
|
||||
const SettingsSubPage(this.section, {super.key});
|
||||
|
||||
final SettingSection section;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: false,
|
||||
title: Text(section.title).tr(),
|
||||
),
|
||||
body: section.widget,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -2,10 +2,10 @@ import 'dart:io';
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart' hide Store;
|
||||
import 'package:immich_mobile/modules/settings/ui/local_storage_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/local_storage_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
|
@ -4,8 +4,8 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||
import 'package:immich_mobile/modules/home/ui/asset_grid/asset_grid_data_structure.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_radio_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_radio_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
|
||||
class GroupSettings extends HookConsumerWidget {
|
|
@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
|
||||
class LayoutSettings extends HookConsumerWidget {
|
|
@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/asset_list_settings/asset_list_group_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/asset_list_settings/asset_list_group_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
import 'asset_list_layout_settings.dart';
|
||||
|
|
@ -8,9 +8,9 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
|||
import 'package:immich_mobile/providers/backup/backup.provider.dart';
|
||||
import 'package:immich_mobile/providers/backup/ios_background_settings.provider.dart';
|
||||
import 'package:immich_mobile/modules/backup/ui/ios_debug_info_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_button_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_button_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
|
@ -4,11 +4,11 @@ import 'package:flutter/material.dart';
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/providers/backup/backup_verification.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/backup_settings/background_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/backup_settings/foreground_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_button_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/backup_settings/background_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/backup_settings/foreground_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_button_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_loading_indicator.dart';
|
||||
|
|
@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/providers/backup/backup.provider.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_button_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_button_list_tile.dart';
|
||||
|
||||
class ForegroundBackupSettings extends ConsumerWidget {
|
||||
const ForegroundBackupSettings({super.key});
|
|
@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
|
||||
class ImageViewerQualitySetting extends HookWidget {
|
|
@ -4,10 +4,10 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/providers/notification_permission.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_button_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_button_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_slider_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
|
|
@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
|
||||
class HapticSetting extends HookConsumerWidget {
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/preference_settings/haptic_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/preference_settings/theme_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/preference_settings/haptic_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/preference_settings/theme_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_page_scaffold.dart';
|
||||
|
||||
class PreferenceSetting extends StatelessWidget {
|
||||
const PreferenceSetting({
|
|
@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_sub_title.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/settings_switch_list_tile.dart';
|
||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||
import 'package:immich_mobile/utils/immich_app_theme.dart';
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/backup_settings/backup_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/backup_settings/backup_settings.dart';
|
||||
|
||||
@RoutePage()
|
||||
class BackupOptionsPage extends StatelessWidget {
|
|
@ -11,10 +11,13 @@ import 'package:immich_mobile/entities/user.entity.dart';
|
|||
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
||||
|
||||
@RoutePage<List<String>?>()
|
||||
class SelectAdditionalUserForSharingPage extends HookConsumerWidget {
|
||||
class AlbumAdditionalSharedUserSelectionPage extends HookConsumerWidget {
|
||||
final Album album;
|
||||
|
||||
const SelectAdditionalUserForSharingPage({super.key, required this.album});
|
||||
const AlbumAdditionalSharedUserSelectionPage({
|
||||
super.key,
|
||||
required this.album,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
|
@ -13,8 +13,8 @@ import 'package:immich_mobile/entities/asset.entity.dart';
|
|||
import 'package:isar/isar.dart';
|
||||
|
||||
@RoutePage<AssetSelectionPageResult?>()
|
||||
class AssetSelectionPage extends HookConsumerWidget {
|
||||
const AssetSelectionPage({
|
||||
class AlbumAssetSelectionPage extends HookConsumerWidget {
|
||||
const AlbumAssetSelectionPage({
|
||||
super.key,
|
||||
required this.existingAssets,
|
||||
this.canDeselect = false,
|
|
@ -7,12 +7,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/providers/album/shared_album.provider.dart';
|
||||
import 'package:immich_mobile/providers/authentication.provider.dart';
|
||||
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
import 'package:immich_mobile/entities/album.entity.dart';
|
||||
import 'package:immich_mobile/entities/user.entity.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
||||
|
||||
@RoutePage()
|
||||
class AlbumOptionsPage extends HookConsumerWidget {
|
|
@ -14,8 +14,8 @@ import 'package:immich_mobile/entities/user.entity.dart';
|
|||
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
||||
|
||||
@RoutePage<List<String>>()
|
||||
class SelectUserForSharingPage extends HookConsumerWidget {
|
||||
const SelectUserForSharingPage({super.key, required this.assets});
|
||||
class AlbumSharedUserSelectionPage extends HookConsumerWidget {
|
||||
const AlbumSharedUserSelectionPage({super.key, required this.assets});
|
||||
|
||||
final Set<Asset> assets;
|
||||
|
|
@ -12,6 +12,7 @@ import 'package:immich_mobile/models/albums/asset_selection_page_result.model.da
|
|||
import 'package:immich_mobile/providers/album/album.provider.dart';
|
||||
import 'package:immich_mobile/providers/album/current_album.provider.dart';
|
||||
import 'package:immich_mobile/providers/album/shared_album.provider.dart';
|
||||
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/services/album.service.dart';
|
||||
import 'package:immich_mobile/modules/album/ui/album_action_outlined_button.dart';
|
||||
import 'package:immich_mobile/modules/album/ui/album_viewer_editable_title.dart';
|
||||
|
@ -25,7 +26,6 @@ import 'package:immich_mobile/providers/asset.provider.dart';
|
|||
import 'package:immich_mobile/shared/ui/asset_grid/multiselect_grid.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
||||
|
||||
@RoutePage()
|
||||
class AlbumViewerPage extends HookConsumerWidget {
|
||||
|
@ -70,7 +70,7 @@ class AlbumViewerPage extends HookConsumerWidget {
|
|||
void onAddPhotosPressed(Album albumInfo) async {
|
||||
AssetSelectionPageResult? returnPayload =
|
||||
await context.pushRoute<AssetSelectionPageResult?>(
|
||||
AssetSelectionRoute(
|
||||
AlbumAssetSelectionRoute(
|
||||
existingAssets: albumInfo.assets,
|
||||
canDeselect: false,
|
||||
query: getRemoteAssetQuery(ref),
|
||||
|
@ -92,7 +92,7 @@ class AlbumViewerPage extends HookConsumerWidget {
|
|||
|
||||
void onAddUsersPressed(Album album) async {
|
||||
List<String>? sharedUserIds = await context.pushRoute<List<String>?>(
|
||||
SelectAdditionalUserForSharingRoute(album: album),
|
||||
AlbumAdditionalSharedUserSelectionRoute(album: album),
|
||||
);
|
||||
|
||||
if (sharedUserIds != null) {
|
|
@ -39,7 +39,7 @@ class CreateAlbumPage extends HookConsumerWidget {
|
|||
|
||||
showSelectUserPage() async {
|
||||
final bool? ok = await context.pushRoute<bool?>(
|
||||
SelectUserForSharingRoute(assets: selectedAssets.value),
|
||||
AlbumSharedUserSelectionRoute(assets: selectedAssets.value),
|
||||
);
|
||||
if (ok == true) {
|
||||
selectedAssets.value = {};
|
||||
|
@ -61,7 +61,7 @@ class CreateAlbumPage extends HookConsumerWidget {
|
|||
onSelectPhotosButtonPressed() async {
|
||||
AssetSelectionPageResult? selectedAsset =
|
||||
await context.pushRoute<AssetSelectionPageResult?>(
|
||||
AssetSelectionRoute(
|
||||
AlbumAssetSelectionRoute(
|
||||
existingAssets: selectedAssets.value,
|
||||
canDeselect: true,
|
||||
query: getRemoteAssetQuery(ref),
|
|
@ -17,8 +17,8 @@ import 'package:immich_mobile/modules/asset_viewer/ui/advanced_bottom_sheet.dart
|
|||
import 'package:immich_mobile/modules/asset_viewer/ui/bottom_gallery_bar.dart';
|
||||
import 'package:immich_mobile/modules/asset_viewer/ui/exif_sheet/exif_bottom_sheet.dart';
|
||||
import 'package:immich_mobile/modules/asset_viewer/ui/gallery_app_bar.dart';
|
||||
import 'package:immich_mobile/modules/asset_viewer/views/video_viewer_page.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/pages/common/video_viewer.page.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/providers/haptic_feedback.provider.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_image.dart';
|
|
@ -3,13 +3,13 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/advanced_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/asset_list_settings/asset_list_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/backup_settings/backup_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/image_viewer_quality_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/language_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/notification_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/ui/preference_settings/preference_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/advanced_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/asset_list_settings/asset_list_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/backup_settings/backup_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/image_viewer_quality_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/language_settings.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/notification_setting.dart';
|
||||
import 'package:immich_mobile/modules/settings/widgets/preference_settings/preference_setting.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
|
||||
enum SettingSection {
|
||||
|
@ -119,3 +119,21 @@ class _TabletLayout extends HookWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
@RoutePage()
|
||||
class SettingsSubPage extends StatelessWidget {
|
||||
const SettingsSubPage(this.section, {super.key});
|
||||
|
||||
final SettingSection section;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: false,
|
||||
title: Text(section.title).tr(),
|
||||
),
|
||||
body: section.widget,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -163,7 +163,7 @@ class TabControllerPage extends HookConsumerWidget {
|
|||
final multiselectEnabled = ref.watch(multiselectProvider);
|
||||
return AutoTabsRouter(
|
||||
routes: const [
|
||||
HomeRoute(),
|
||||
PhotosRoute(),
|
||||
SearchRoute(),
|
||||
SharingRoute(),
|
||||
LibraryRoute(),
|
|
@ -13,7 +13,7 @@ import 'package:immich_mobile/entities/asset.entity.dart';
|
|||
import 'package:immich_mobile/providers/server_info.provider.dart';
|
||||
import 'package:immich_mobile/shared/ui/confirm_dialog.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
|
||||
|
||||
@RoutePage()
|
||||
class TrashPage extends HookConsumerWidget {
|
|
@ -19,8 +19,8 @@ import 'package:immich_mobile/shared/ui/immich_app_bar.dart';
|
|||
import 'package:immich_mobile/shared/ui/immich_loading_indicator.dart';
|
||||
|
||||
@RoutePage()
|
||||
class HomePage extends HookConsumerWidget {
|
||||
const HomePage({super.key});
|
||||
class PhotosPage extends HookConsumerWidget {
|
||||
const PhotosPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
|
@ -25,7 +25,7 @@ import 'package:immich_mobile/routing/router.dart';
|
|||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/providers/db.provider.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/utils/debounce.dart';
|
||||
import 'package:maplibre_gl/maplibre_gl.dart';
|
||||
|
|
@ -1,51 +1,18 @@
|
|||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/modules/activities/views/activities_page.dart';
|
||||
import 'package:immich_mobile/models/albums/asset_selection_page_result.model.dart';
|
||||
import 'package:immich_mobile/modules/album/views/album_options_part.dart';
|
||||
import 'package:immich_mobile/modules/album/views/album_viewer_page.dart';
|
||||
import 'package:immich_mobile/modules/album/views/asset_selection_page.dart';
|
||||
import 'package:immich_mobile/modules/album/views/create_album_page.dart';
|
||||
import 'package:immich_mobile/modules/album/views/library_page.dart';
|
||||
import 'package:immich_mobile/modules/backup/views/backup_options_page.dart';
|
||||
import 'package:immich_mobile/modules/map/views/map_location_picker_page.dart';
|
||||
import 'package:immich_mobile/modules/map/views/map_page.dart';
|
||||
import 'package:immich_mobile/models/memories/memory.model.dart';
|
||||
import 'package:immich_mobile/modules/memories/views/memory_page.dart';
|
||||
import 'package:immich_mobile/modules/partner/views/partner_detail_page.dart';
|
||||
import 'package:immich_mobile/modules/partner/views/partner_page.dart';
|
||||
import 'package:immich_mobile/modules/album/views/select_additional_user_for_sharing_page.dart';
|
||||
import 'package:immich_mobile/modules/album/views/select_user_for_sharing_page.dart';
|
||||
import 'package:immich_mobile/modules/album/views/sharing_page.dart';
|
||||
import 'package:immich_mobile/modules/archive/views/archive_page.dart';
|
||||
import 'package:immich_mobile/modules/asset_viewer/views/gallery_viewer.dart';
|
||||
import 'package:immich_mobile/modules/asset_viewer/views/video_viewer_page.dart';
|
||||
import 'package:immich_mobile/modules/backup/views/album_preview_page.dart';
|
||||
import 'package:immich_mobile/modules/backup/views/backup_album_selection_page.dart';
|
||||
import 'package:immich_mobile/modules/backup/views/backup_controller_page.dart';
|
||||
import 'package:immich_mobile/modules/backup/views/failed_backup_status_page.dart';
|
||||
import 'package:immich_mobile/modules/favorite/views/favorites_page.dart';
|
||||
import 'package:immich_mobile/modules/home/views/home_page.dart';
|
||||
import 'package:immich_mobile/modules/login/views/change_password_page.dart';
|
||||
import 'package:immich_mobile/modules/login/views/login_page.dart';
|
||||
import 'package:immich_mobile/providers/gallery_permission.provider.dart';
|
||||
import 'package:immich_mobile/modules/onboarding/views/permission_onboarding_page.dart';
|
||||
import 'package:immich_mobile/models/search/search_filter.model.dart';
|
||||
import 'package:immich_mobile/modules/settings/views/settings_sub_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/search_input_page.dart';
|
||||
import 'package:immich_mobile/pages/common/activities.page.dart';
|
||||
import 'package:immich_mobile/models/albums/asset_selection_page_result.model.dart';
|
||||
import 'package:immich_mobile/pages/common/album_options.page.dart';
|
||||
import 'package:immich_mobile/pages/common/album_viewer.page.dart';
|
||||
import 'package:immich_mobile/pages/common/album_asset_selection.page.dart';
|
||||
import 'package:immich_mobile/pages/common/create_album.page.dart';
|
||||
import 'package:immich_mobile/models/shared_link/shared_link.model.dart';
|
||||
import 'package:immich_mobile/modules/shared_link/views/shared_link_edit_page.dart';
|
||||
import 'package:immich_mobile/modules/shared_link/views/shared_link_page.dart';
|
||||
import 'package:immich_mobile/modules/trash/views/trash_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/all_motion_videos_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/all_people_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/all_videos_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/all_places_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/person_result_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/recently_added_page.dart';
|
||||
import 'package:immich_mobile/modules/search/views/search_page.dart';
|
||||
import 'package:immich_mobile/modules/settings/views/settings_page.dart';
|
||||
import 'package:immich_mobile/pages/common/album_additional_shared_user_selection.page.dart';
|
||||
import 'package:immich_mobile/pages/common/album_shared_user_selection.page.dart';
|
||||
import 'package:immich_mobile/providers/gallery_permission.provider.dart';
|
||||
import 'package:immich_mobile/routing/auth_guard.dart';
|
||||
import 'package:immich_mobile/routing/custom_transition_builders.dart';
|
||||
import 'package:immich_mobile/routing/duplicate_guard.dart';
|
||||
|
@ -55,11 +22,43 @@ import 'package:immich_mobile/entities/album.entity.dart';
|
|||
import 'package:immich_mobile/entities/logger_message.entity.dart';
|
||||
import 'package:immich_mobile/entities/user.entity.dart';
|
||||
import 'package:immich_mobile/providers/api.provider.dart';
|
||||
import 'package:immich_mobile/pages/common/app_log_detail.page.dart';
|
||||
import 'package:immich_mobile/pages/common/app_log.page.dart';
|
||||
import 'package:immich_mobile/pages/backup/album_preview.page.dart';
|
||||
import 'package:immich_mobile/pages/backup/backup_album_selection.page.dart';
|
||||
import 'package:immich_mobile/pages/backup/backup_controller.page.dart';
|
||||
import 'package:immich_mobile/pages/backup/backup_options.page.dart';
|
||||
import 'package:immich_mobile/pages/backup/failed_backup_status.page.dart';
|
||||
import 'package:immich_mobile/pages/common/gallery_viewer.page.dart';
|
||||
import 'package:immich_mobile/pages/library/archive.page.dart';
|
||||
import 'package:immich_mobile/pages/library/favorite.page.dart';
|
||||
import 'package:immich_mobile/pages/library/library.page.dart';
|
||||
import 'package:immich_mobile/pages/library/trash.page.dart';
|
||||
import 'package:immich_mobile/pages/login/change_password.page.dart';
|
||||
import 'package:immich_mobile/pages/login/login.page.dart';
|
||||
import 'package:immich_mobile/pages/onboarding/permission_onboarding.page.dart';
|
||||
import 'package:immich_mobile/pages/photos/memory.page.dart';
|
||||
import 'package:immich_mobile/pages/photos/photos.page.dart';
|
||||
import 'package:immich_mobile/pages/search/all_motion_videos.page.dart';
|
||||
import 'package:immich_mobile/pages/search/all_people.page.dart';
|
||||
import 'package:immich_mobile/pages/search/all_places.page.dart';
|
||||
import 'package:immich_mobile/pages/search/all_videos.page.dart';
|
||||
import 'package:immich_mobile/pages/search/map/map_location_picker.page.dart';
|
||||
import 'package:immich_mobile/pages/search/map/map.page.dart';
|
||||
import 'package:immich_mobile/pages/search/person_result.page.dart';
|
||||
import 'package:immich_mobile/pages/search/recently_added.page.dart';
|
||||
import 'package:immich_mobile/pages/search/search_input.page.dart';
|
||||
import 'package:immich_mobile/pages/search/search.page.dart';
|
||||
import 'package:immich_mobile/pages/common/settings.page.dart';
|
||||
import 'package:immich_mobile/pages/sharing/partner/partner_detail.page.dart';
|
||||
import 'package:immich_mobile/pages/sharing/partner/partner.page.dart';
|
||||
import 'package:immich_mobile/pages/sharing/shared_link/shared_link_edit.page.dart';
|
||||
import 'package:immich_mobile/pages/sharing/shared_link/shared_link.page.dart';
|
||||
import 'package:immich_mobile/pages/sharing/sharing.page.dart';
|
||||
import 'package:immich_mobile/pages/common/splash_screen.page.dart';
|
||||
import 'package:immich_mobile/pages/common/tab_controller.page.dart';
|
||||
import 'package:immich_mobile/pages/common/video_viewer.page.dart';
|
||||
import 'package:immich_mobile/services/api.service.dart';
|
||||
import 'package:immich_mobile/shared/views/app_log_detail_page.dart';
|
||||
import 'package:immich_mobile/shared/views/app_log_page.dart';
|
||||
import 'package:immich_mobile/shared/views/splash_screen.dart';
|
||||
import 'package:immich_mobile/shared/views/tab_controller_page.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:maplibre_gl/maplibre_gl.dart';
|
||||
import 'package:photo_manager/photo_manager.dart' hide LatLng;
|
||||
|
@ -97,7 +96,10 @@ class AppRouter extends _$AppRouter {
|
|||
page: TabControllerRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
children: [
|
||||
AutoRoute(page: HomeRoute.page, guards: [_authGuard, _duplicateGuard]),
|
||||
AutoRoute(
|
||||
page: PhotosRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
),
|
||||
AutoRoute(
|
||||
page: SearchRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
|
@ -145,12 +147,12 @@ class AppRouter extends _$AppRouter {
|
|||
guards: [_authGuard, _duplicateGuard],
|
||||
),
|
||||
CustomRoute(
|
||||
page: AssetSelectionRoute.page,
|
||||
page: AlbumAssetSelectionRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
transitionsBuilder: TransitionsBuilders.slideBottom,
|
||||
),
|
||||
CustomRoute(
|
||||
page: SelectUserForSharingRoute.page,
|
||||
page: AlbumSharedUserSelectionRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
transitionsBuilder: TransitionsBuilders.slideBottom,
|
||||
),
|
||||
|
@ -159,7 +161,7 @@ class AppRouter extends _$AppRouter {
|
|||
guards: [_authGuard, _duplicateGuard],
|
||||
),
|
||||
CustomRoute(
|
||||
page: SelectAdditionalUserForSharingRoute.page,
|
||||
page: AlbumAdditionalSharedUserSelectionRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
transitionsBuilder: TransitionsBuilders.slideBottom,
|
||||
),
|
||||
|
|
|
@ -97,11 +97,11 @@ abstract class _$AppRouter extends RootStackRouter {
|
|||
child: const ArchivePage(),
|
||||
);
|
||||
},
|
||||
AssetSelectionRoute.name: (routeData) {
|
||||
AlbumAssetSelectionRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<AssetSelectionRouteArgs>();
|
||||
return AutoRoutePage<AssetSelectionPageResult?>(
|
||||
routeData: routeData,
|
||||
child: AssetSelectionPage(
|
||||
child: AlbumAssetSelectionPage(
|
||||
key: args.key,
|
||||
existingAssets: args.existingAssets,
|
||||
canDeselect: args.canDeselect,
|
||||
|
@ -170,10 +170,10 @@ abstract class _$AppRouter extends RootStackRouter {
|
|||
),
|
||||
);
|
||||
},
|
||||
HomeRoute.name: (routeData) {
|
||||
PhotosRoute.name: (routeData) {
|
||||
return AutoRoutePage<dynamic>(
|
||||
routeData: routeData,
|
||||
child: const HomePage(),
|
||||
child: const PhotosPage(),
|
||||
);
|
||||
},
|
||||
LibraryRoute.name: (routeData) {
|
||||
|
@ -272,21 +272,21 @@ abstract class _$AppRouter extends RootStackRouter {
|
|||
child: const SearchPage(),
|
||||
);
|
||||
},
|
||||
SelectAdditionalUserForSharingRoute.name: (routeData) {
|
||||
AlbumAdditionalSharedUserSelectionRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<SelectAdditionalUserForSharingRouteArgs>();
|
||||
return AutoRoutePage<List<String>?>(
|
||||
routeData: routeData,
|
||||
child: SelectAdditionalUserForSharingPage(
|
||||
child: AlbumAdditionalSharedUserSelectionPage(
|
||||
key: args.key,
|
||||
album: args.album,
|
||||
),
|
||||
);
|
||||
},
|
||||
SelectUserForSharingRoute.name: (routeData) {
|
||||
AlbumSharedUserSelectionRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<SelectUserForSharingRouteArgs>();
|
||||
return AutoRoutePage<List<String>>(
|
||||
routeData: routeData,
|
||||
child: SelectUserForSharingPage(
|
||||
child: AlbumSharedUserSelectionPage(
|
||||
key: args.key,
|
||||
assets: args.assets,
|
||||
),
|
||||
|
@ -620,16 +620,16 @@ class ArchiveRoute extends PageRouteInfo<void> {
|
|||
}
|
||||
|
||||
/// generated route for
|
||||
/// [AssetSelectionPage]
|
||||
class AssetSelectionRoute extends PageRouteInfo<AssetSelectionRouteArgs> {
|
||||
AssetSelectionRoute({
|
||||
/// [AlbumAssetSelectionPage]
|
||||
class AlbumAssetSelectionRoute extends PageRouteInfo<AssetSelectionRouteArgs> {
|
||||
AlbumAssetSelectionRoute({
|
||||
Key? key,
|
||||
required Set<Asset> existingAssets,
|
||||
bool canDeselect = false,
|
||||
required QueryBuilder<Asset, Asset, QAfterSortBy>? query,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
AssetSelectionRoute.name,
|
||||
AlbumAssetSelectionRoute.name,
|
||||
args: AssetSelectionRouteArgs(
|
||||
key: key,
|
||||
existingAssets: existingAssets,
|
||||
|
@ -639,7 +639,7 @@ class AssetSelectionRoute extends PageRouteInfo<AssetSelectionRouteArgs> {
|
|||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'AssetSelectionRoute';
|
||||
static const String name = 'AlbumAssetSelectionRoute';
|
||||
|
||||
static const PageInfo<AssetSelectionRouteArgs> page =
|
||||
PageInfo<AssetSelectionRouteArgs>(name);
|
||||
|
@ -853,15 +853,15 @@ class GalleryViewerRouteArgs {
|
|||
}
|
||||
|
||||
/// generated route for
|
||||
/// [HomePage]
|
||||
class HomeRoute extends PageRouteInfo<void> {
|
||||
const HomeRoute({List<PageRouteInfo>? children})
|
||||
/// [PhotosPage]
|
||||
class PhotosRoute extends PageRouteInfo<void> {
|
||||
const PhotosRoute({List<PageRouteInfo>? children})
|
||||
: super(
|
||||
HomeRoute.name,
|
||||
PhotosRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
static const String name = 'PhotosRoute';
|
||||
|
||||
static const PageInfo<void> page = PageInfo<void>(name);
|
||||
}
|
||||
|
@ -1164,15 +1164,15 @@ class SearchRoute extends PageRouteInfo<void> {
|
|||
}
|
||||
|
||||
/// generated route for
|
||||
/// [SelectAdditionalUserForSharingPage]
|
||||
class SelectAdditionalUserForSharingRoute
|
||||
/// [AlbumAdditionalSharedUserSelectionPage]
|
||||
class AlbumAdditionalSharedUserSelectionRoute
|
||||
extends PageRouteInfo<SelectAdditionalUserForSharingRouteArgs> {
|
||||
SelectAdditionalUserForSharingRoute({
|
||||
AlbumAdditionalSharedUserSelectionRoute({
|
||||
Key? key,
|
||||
required Album album,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
SelectAdditionalUserForSharingRoute.name,
|
||||
AlbumAdditionalSharedUserSelectionRoute.name,
|
||||
args: SelectAdditionalUserForSharingRouteArgs(
|
||||
key: key,
|
||||
album: album,
|
||||
|
@ -1180,7 +1180,7 @@ class SelectAdditionalUserForSharingRoute
|
|||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'SelectAdditionalUserForSharingRoute';
|
||||
static const String name = 'AlbumAdditionalSharedUserSelectionRoute';
|
||||
|
||||
static const PageInfo<SelectAdditionalUserForSharingRouteArgs> page =
|
||||
PageInfo<SelectAdditionalUserForSharingRouteArgs>(name);
|
||||
|
@ -1203,15 +1203,15 @@ class SelectAdditionalUserForSharingRouteArgs {
|
|||
}
|
||||
|
||||
/// generated route for
|
||||
/// [SelectUserForSharingPage]
|
||||
class SelectUserForSharingRoute
|
||||
/// [AlbumSharedUserSelectionPage]
|
||||
class AlbumSharedUserSelectionRoute
|
||||
extends PageRouteInfo<SelectUserForSharingRouteArgs> {
|
||||
SelectUserForSharingRoute({
|
||||
AlbumSharedUserSelectionRoute({
|
||||
Key? key,
|
||||
required Set<Asset> assets,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
SelectUserForSharingRoute.name,
|
||||
AlbumSharedUserSelectionRoute.name,
|
||||
args: SelectUserForSharingRouteArgs(
|
||||
key: key,
|
||||
assets: assets,
|
||||
|
@ -1219,7 +1219,7 @@ class SelectUserForSharingRoute
|
|||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'SelectUserForSharingRoute';
|
||||
static const String name = 'AlbumSharedUserSelectionRoute';
|
||||
|
||||
static const PageInfo<SelectUserForSharingRouteArgs> page =
|
||||
PageInfo<SelectUserForSharingRouteArgs>(name);
|
||||
|
|
|
@ -25,7 +25,7 @@ import 'package:immich_mobile/providers/asset.provider.dart';
|
|||
import 'package:immich_mobile/providers/user.provider.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_loading_indicator.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
|
||||
import 'package:immich_mobile/utils/selection_handlers.dart';
|
||||
|
||||
class MultiselectGrid extends HookConsumerWidget {
|
||||
|
|
|
@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:immich_mobile/models/activities/activity.model.dart';
|
||||
import 'package:immich_mobile/providers/activity.provider.dart';
|
||||
import 'package:immich_mobile/modules/activities/views/activities_page.dart';
|
||||
import 'package:immich_mobile/pages/common/activities.page.dart';
|
||||
import 'package:immich_mobile/modules/activities/widgets/activity_text_field.dart';
|
||||
import 'package:immich_mobile/modules/activities/widgets/dismissible_activity.dart';
|
||||
import 'package:immich_mobile/providers/album/current_album.provider.dart';
|
||||
|
|
Loading…
Reference in a new issue