mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +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.provider.dart';
|
||||||
import 'package:immich_mobile/providers/album/album_viewer.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/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/routing/router.dart';
|
||||||
import 'package:immich_mobile/entities/album.entity.dart';
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
|
||||||
|
|
||||||
class AlbumViewerAppbar extends HookConsumerWidget
|
class AlbumViewerAppbar extends HookConsumerWidget
|
||||||
implements PreferredSizeWidget {
|
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/providers/map/map_state.provider.dart';
|
||||||
import 'package:immich_mobile/modules/map/widgets/map_settings_sheet.dart';
|
import 'package:immich_mobile/modules/map/widgets/map_settings_sheet.dart';
|
||||||
import 'package:immich_mobile/entities/asset.entity.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';
|
import 'package:immich_mobile/utils/selection_handlers.dart';
|
||||||
|
|
||||||
class MapAppBar extends HookWidget implements PreferredSizeWidget {
|
class MapAppBar extends HookWidget implements PreferredSizeWidget {
|
||||||
|
|
|
@ -3,8 +3,8 @@ import 'dart:ui';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.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/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/hooks/blurhash_hook.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_image.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:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart' hide Store;
|
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/widgets/local_storage_settings.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_slider_list_tile.dart';
|
import 'package:immich_mobile/modules/settings/widgets/settings_slider_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
import 'package:immich_mobile/modules/settings/widgets/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_switch_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/modules/home/ui/asset_grid/asset_grid_data_structure.dart';
|
||||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/settings_radio_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_title.dart';
|
import 'package:immich_mobile/modules/settings/widgets/settings_sub_title.dart';
|
||||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
|
|
||||||
class GroupSettings extends HookConsumerWidget {
|
class GroupSettings extends HookConsumerWidget {
|
|
@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/settings_slider_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_title.dart';
|
import 'package:immich_mobile/modules/settings/widgets/settings_sub_title.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.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/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
|
|
||||||
class LayoutSettings extends HookConsumerWidget {
|
class LayoutSettings extends HookConsumerWidget {
|
|
@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/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/widgets/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_switch_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
import 'asset_list_layout_settings.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/backup.provider.dart';
|
||||||
import 'package:immich_mobile/providers/backup/ios_background_settings.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/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/widgets/settings_button_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_slider_list_tile.dart';
|
import 'package:immich_mobile/modules/settings/widgets/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_switch_list_tile.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:url_launcher/url_launcher.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:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/providers/backup/backup_verification.provider.dart';
|
import 'package:immich_mobile/providers/backup/backup_verification.provider.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/backup_settings/background_settings.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/backup_settings/foreground_settings.dart';
|
import 'package:immich_mobile/modules/settings/widgets/backup_settings/foreground_settings.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';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
import 'package:immich_mobile/modules/settings/widgets/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_switch_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_loading_indicator.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:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/providers/backup/backup.provider.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 {
|
class ForegroundBackupSettings extends ConsumerWidget {
|
||||||
const ForegroundBackupSettings({super.key});
|
const ForegroundBackupSettings({super.key});
|
|
@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/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_switch_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
|
|
||||||
class ImageViewerQualitySetting extends HookWidget {
|
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/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/providers/notification_permission.provider.dart';
|
import 'package:immich_mobile/providers/notification_permission.provider.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/settings_button_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_slider_list_tile.dart';
|
import 'package:immich_mobile/modules/settings/widgets/settings_slider_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
import 'package:immich_mobile/modules/settings/widgets/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_switch_list_tile.dart';
|
||||||
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
import 'package:immich_mobile/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
import 'package:permission_handler/permission_handler.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:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/settings_sub_title.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.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/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
|
|
||||||
class HapticSetting extends HookConsumerWidget {
|
class HapticSetting extends HookConsumerWidget {
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/preference_settings/haptic_setting.dart';
|
import 'package:immich_mobile/modules/settings/widgets/preference_settings/haptic_setting.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/preference_settings/theme_setting.dart';
|
import 'package:immich_mobile/modules/settings/widgets/preference_settings/theme_setting.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_sub_page_scaffold.dart';
|
import 'package:immich_mobile/modules/settings/widgets/settings_sub_page_scaffold.dart';
|
||||||
|
|
||||||
class PreferenceSetting extends StatelessWidget {
|
class PreferenceSetting extends StatelessWidget {
|
||||||
const PreferenceSetting({
|
const PreferenceSetting({
|
|
@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.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/widgets/settings_sub_title.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.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/modules/settings/utils/app_settings_update_hook.dart';
|
||||||
import 'package:immich_mobile/utils/immich_app_theme.dart';
|
import 'package:immich_mobile/utils/immich_app_theme.dart';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.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()
|
@RoutePage()
|
||||||
class BackupOptionsPage extends StatelessWidget {
|
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';
|
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
||||||
|
|
||||||
@RoutePage<List<String>?>()
|
@RoutePage<List<String>?>()
|
||||||
class SelectAdditionalUserForSharingPage extends HookConsumerWidget {
|
class AlbumAdditionalSharedUserSelectionPage extends HookConsumerWidget {
|
||||||
final Album album;
|
final Album album;
|
||||||
|
|
||||||
const SelectAdditionalUserForSharingPage({super.key, required this.album});
|
const AlbumAdditionalSharedUserSelectionPage({
|
||||||
|
super.key,
|
||||||
|
required this.album,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
@ -13,8 +13,8 @@ import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
@RoutePage<AssetSelectionPageResult?>()
|
@RoutePage<AssetSelectionPageResult?>()
|
||||||
class AssetSelectionPage extends HookConsumerWidget {
|
class AlbumAssetSelectionPage extends HookConsumerWidget {
|
||||||
const AssetSelectionPage({
|
const AlbumAssetSelectionPage({
|
||||||
super.key,
|
super.key,
|
||||||
required this.existingAssets,
|
required this.existingAssets,
|
||||||
this.canDeselect = false,
|
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/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/providers/album/shared_album.provider.dart';
|
import 'package:immich_mobile/providers/album/shared_album.provider.dart';
|
||||||
import 'package:immich_mobile/providers/authentication.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/routing/router.dart';
|
||||||
import 'package:immich_mobile/entities/album.entity.dart';
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
import 'package:immich_mobile/entities/user.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/immich_toast.dart';
|
||||||
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
||||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
|
||||||
|
|
||||||
@RoutePage()
|
@RoutePage()
|
||||||
class AlbumOptionsPage extends HookConsumerWidget {
|
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';
|
import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
|
||||||
|
|
||||||
@RoutePage<List<String>>()
|
@RoutePage<List<String>>()
|
||||||
class SelectUserForSharingPage extends HookConsumerWidget {
|
class AlbumSharedUserSelectionPage extends HookConsumerWidget {
|
||||||
const SelectUserForSharingPage({super.key, required this.assets});
|
const AlbumSharedUserSelectionPage({super.key, required this.assets});
|
||||||
|
|
||||||
final Set<Asset> 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/album.provider.dart';
|
||||||
import 'package:immich_mobile/providers/album/current_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/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/services/album.service.dart';
|
||||||
import 'package:immich_mobile/modules/album/ui/album_action_outlined_button.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';
|
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/asset_grid/multiselect_grid.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_toast.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/ui/user_circle_avatar.dart';
|
||||||
import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
|
|
||||||
|
|
||||||
@RoutePage()
|
@RoutePage()
|
||||||
class AlbumViewerPage extends HookConsumerWidget {
|
class AlbumViewerPage extends HookConsumerWidget {
|
||||||
|
@ -70,7 +70,7 @@ class AlbumViewerPage extends HookConsumerWidget {
|
||||||
void onAddPhotosPressed(Album albumInfo) async {
|
void onAddPhotosPressed(Album albumInfo) async {
|
||||||
AssetSelectionPageResult? returnPayload =
|
AssetSelectionPageResult? returnPayload =
|
||||||
await context.pushRoute<AssetSelectionPageResult?>(
|
await context.pushRoute<AssetSelectionPageResult?>(
|
||||||
AssetSelectionRoute(
|
AlbumAssetSelectionRoute(
|
||||||
existingAssets: albumInfo.assets,
|
existingAssets: albumInfo.assets,
|
||||||
canDeselect: false,
|
canDeselect: false,
|
||||||
query: getRemoteAssetQuery(ref),
|
query: getRemoteAssetQuery(ref),
|
||||||
|
@ -92,7 +92,7 @@ class AlbumViewerPage extends HookConsumerWidget {
|
||||||
|
|
||||||
void onAddUsersPressed(Album album) async {
|
void onAddUsersPressed(Album album) async {
|
||||||
List<String>? sharedUserIds = await context.pushRoute<List<String>?>(
|
List<String>? sharedUserIds = await context.pushRoute<List<String>?>(
|
||||||
SelectAdditionalUserForSharingRoute(album: album),
|
AlbumAdditionalSharedUserSelectionRoute(album: album),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (sharedUserIds != null) {
|
if (sharedUserIds != null) {
|
|
@ -39,7 +39,7 @@ class CreateAlbumPage extends HookConsumerWidget {
|
||||||
|
|
||||||
showSelectUserPage() async {
|
showSelectUserPage() async {
|
||||||
final bool? ok = await context.pushRoute<bool?>(
|
final bool? ok = await context.pushRoute<bool?>(
|
||||||
SelectUserForSharingRoute(assets: selectedAssets.value),
|
AlbumSharedUserSelectionRoute(assets: selectedAssets.value),
|
||||||
);
|
);
|
||||||
if (ok == true) {
|
if (ok == true) {
|
||||||
selectedAssets.value = {};
|
selectedAssets.value = {};
|
||||||
|
@ -61,7 +61,7 @@ class CreateAlbumPage extends HookConsumerWidget {
|
||||||
onSelectPhotosButtonPressed() async {
|
onSelectPhotosButtonPressed() async {
|
||||||
AssetSelectionPageResult? selectedAsset =
|
AssetSelectionPageResult? selectedAsset =
|
||||||
await context.pushRoute<AssetSelectionPageResult?>(
|
await context.pushRoute<AssetSelectionPageResult?>(
|
||||||
AssetSelectionRoute(
|
AlbumAssetSelectionRoute(
|
||||||
existingAssets: selectedAssets.value,
|
existingAssets: selectedAssets.value,
|
||||||
canDeselect: true,
|
canDeselect: true,
|
||||||
query: getRemoteAssetQuery(ref),
|
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/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/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/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/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/services/app_settings.service.dart';
|
||||||
import 'package:immich_mobile/providers/haptic_feedback.provider.dart';
|
import 'package:immich_mobile/providers/haptic_feedback.provider.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_image.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/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.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/widgets/advanced_settings.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/asset_list_settings/asset_list_settings.dart';
|
import 'package:immich_mobile/modules/settings/widgets/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/widgets/backup_settings/backup_settings.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/image_viewer_quality_setting.dart';
|
import 'package:immich_mobile/modules/settings/widgets/image_viewer_quality_setting.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/language_settings.dart';
|
import 'package:immich_mobile/modules/settings/widgets/language_settings.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/notification_setting.dart';
|
import 'package:immich_mobile/modules/settings/widgets/notification_setting.dart';
|
||||||
import 'package:immich_mobile/modules/settings/ui/preference_settings/preference_setting.dart';
|
import 'package:immich_mobile/modules/settings/widgets/preference_settings/preference_setting.dart';
|
||||||
import 'package:immich_mobile/routing/router.dart';
|
import 'package:immich_mobile/routing/router.dart';
|
||||||
|
|
||||||
enum SettingSection {
|
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);
|
final multiselectEnabled = ref.watch(multiselectProvider);
|
||||||
return AutoTabsRouter(
|
return AutoTabsRouter(
|
||||||
routes: const [
|
routes: const [
|
||||||
HomeRoute(),
|
PhotosRoute(),
|
||||||
SearchRoute(),
|
SearchRoute(),
|
||||||
SharingRoute(),
|
SharingRoute(),
|
||||||
LibraryRoute(),
|
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/providers/server_info.provider.dart';
|
||||||
import 'package:immich_mobile/shared/ui/confirm_dialog.dart';
|
import 'package:immich_mobile/shared/ui/confirm_dialog.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_toast.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()
|
@RoutePage()
|
||||||
class TrashPage extends HookConsumerWidget {
|
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';
|
import 'package:immich_mobile/shared/ui/immich_loading_indicator.dart';
|
||||||
|
|
||||||
@RoutePage()
|
@RoutePage()
|
||||||
class HomePage extends HookConsumerWidget {
|
class PhotosPage extends HookConsumerWidget {
|
||||||
const HomePage({super.key});
|
const PhotosPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
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/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/providers/db.provider.dart';
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_toast.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:immich_mobile/utils/debounce.dart';
|
||||||
import 'package:maplibre_gl/maplibre_gl.dart';
|
import 'package:maplibre_gl/maplibre_gl.dart';
|
||||||
|
|
|
@ -1,51 +1,18 @@
|
||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.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/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/models/search/search_filter.model.dart';
|
||||||
import 'package:immich_mobile/modules/settings/views/settings_sub_page.dart';
|
import 'package:immich_mobile/pages/common/activities.page.dart';
|
||||||
import 'package:immich_mobile/modules/search/views/search_input_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/models/shared_link/shared_link.model.dart';
|
||||||
import 'package:immich_mobile/modules/shared_link/views/shared_link_edit_page.dart';
|
import 'package:immich_mobile/pages/common/album_additional_shared_user_selection.page.dart';
|
||||||
import 'package:immich_mobile/modules/shared_link/views/shared_link_page.dart';
|
import 'package:immich_mobile/pages/common/album_shared_user_selection.page.dart';
|
||||||
import 'package:immich_mobile/modules/trash/views/trash_page.dart';
|
import 'package:immich_mobile/providers/gallery_permission.provider.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/routing/auth_guard.dart';
|
import 'package:immich_mobile/routing/auth_guard.dart';
|
||||||
import 'package:immich_mobile/routing/custom_transition_builders.dart';
|
import 'package:immich_mobile/routing/custom_transition_builders.dart';
|
||||||
import 'package:immich_mobile/routing/duplicate_guard.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/logger_message.entity.dart';
|
||||||
import 'package:immich_mobile/entities/user.entity.dart';
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
import 'package:immich_mobile/providers/api.provider.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/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:isar/isar.dart';
|
||||||
import 'package:maplibre_gl/maplibre_gl.dart';
|
import 'package:maplibre_gl/maplibre_gl.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart' hide LatLng;
|
import 'package:photo_manager/photo_manager.dart' hide LatLng;
|
||||||
|
@ -97,7 +96,10 @@ class AppRouter extends _$AppRouter {
|
||||||
page: TabControllerRoute.page,
|
page: TabControllerRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
children: [
|
children: [
|
||||||
AutoRoute(page: HomeRoute.page, guards: [_authGuard, _duplicateGuard]),
|
AutoRoute(
|
||||||
|
page: PhotosRoute.page,
|
||||||
|
guards: [_authGuard, _duplicateGuard],
|
||||||
|
),
|
||||||
AutoRoute(
|
AutoRoute(
|
||||||
page: SearchRoute.page,
|
page: SearchRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
|
@ -145,12 +147,12 @@ class AppRouter extends _$AppRouter {
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
),
|
),
|
||||||
CustomRoute(
|
CustomRoute(
|
||||||
page: AssetSelectionRoute.page,
|
page: AlbumAssetSelectionRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
transitionsBuilder: TransitionsBuilders.slideBottom,
|
transitionsBuilder: TransitionsBuilders.slideBottom,
|
||||||
),
|
),
|
||||||
CustomRoute(
|
CustomRoute(
|
||||||
page: SelectUserForSharingRoute.page,
|
page: AlbumSharedUserSelectionRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
transitionsBuilder: TransitionsBuilders.slideBottom,
|
transitionsBuilder: TransitionsBuilders.slideBottom,
|
||||||
),
|
),
|
||||||
|
@ -159,7 +161,7 @@ class AppRouter extends _$AppRouter {
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
),
|
),
|
||||||
CustomRoute(
|
CustomRoute(
|
||||||
page: SelectAdditionalUserForSharingRoute.page,
|
page: AlbumAdditionalSharedUserSelectionRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
transitionsBuilder: TransitionsBuilders.slideBottom,
|
transitionsBuilder: TransitionsBuilders.slideBottom,
|
||||||
),
|
),
|
||||||
|
|
|
@ -97,11 +97,11 @@ abstract class _$AppRouter extends RootStackRouter {
|
||||||
child: const ArchivePage(),
|
child: const ArchivePage(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
AssetSelectionRoute.name: (routeData) {
|
AlbumAssetSelectionRoute.name: (routeData) {
|
||||||
final args = routeData.argsAs<AssetSelectionRouteArgs>();
|
final args = routeData.argsAs<AssetSelectionRouteArgs>();
|
||||||
return AutoRoutePage<AssetSelectionPageResult?>(
|
return AutoRoutePage<AssetSelectionPageResult?>(
|
||||||
routeData: routeData,
|
routeData: routeData,
|
||||||
child: AssetSelectionPage(
|
child: AlbumAssetSelectionPage(
|
||||||
key: args.key,
|
key: args.key,
|
||||||
existingAssets: args.existingAssets,
|
existingAssets: args.existingAssets,
|
||||||
canDeselect: args.canDeselect,
|
canDeselect: args.canDeselect,
|
||||||
|
@ -170,10 +170,10 @@ abstract class _$AppRouter extends RootStackRouter {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
HomeRoute.name: (routeData) {
|
PhotosRoute.name: (routeData) {
|
||||||
return AutoRoutePage<dynamic>(
|
return AutoRoutePage<dynamic>(
|
||||||
routeData: routeData,
|
routeData: routeData,
|
||||||
child: const HomePage(),
|
child: const PhotosPage(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
LibraryRoute.name: (routeData) {
|
LibraryRoute.name: (routeData) {
|
||||||
|
@ -272,21 +272,21 @@ abstract class _$AppRouter extends RootStackRouter {
|
||||||
child: const SearchPage(),
|
child: const SearchPage(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
SelectAdditionalUserForSharingRoute.name: (routeData) {
|
AlbumAdditionalSharedUserSelectionRoute.name: (routeData) {
|
||||||
final args = routeData.argsAs<SelectAdditionalUserForSharingRouteArgs>();
|
final args = routeData.argsAs<SelectAdditionalUserForSharingRouteArgs>();
|
||||||
return AutoRoutePage<List<String>?>(
|
return AutoRoutePage<List<String>?>(
|
||||||
routeData: routeData,
|
routeData: routeData,
|
||||||
child: SelectAdditionalUserForSharingPage(
|
child: AlbumAdditionalSharedUserSelectionPage(
|
||||||
key: args.key,
|
key: args.key,
|
||||||
album: args.album,
|
album: args.album,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
SelectUserForSharingRoute.name: (routeData) {
|
AlbumSharedUserSelectionRoute.name: (routeData) {
|
||||||
final args = routeData.argsAs<SelectUserForSharingRouteArgs>();
|
final args = routeData.argsAs<SelectUserForSharingRouteArgs>();
|
||||||
return AutoRoutePage<List<String>>(
|
return AutoRoutePage<List<String>>(
|
||||||
routeData: routeData,
|
routeData: routeData,
|
||||||
child: SelectUserForSharingPage(
|
child: AlbumSharedUserSelectionPage(
|
||||||
key: args.key,
|
key: args.key,
|
||||||
assets: args.assets,
|
assets: args.assets,
|
||||||
),
|
),
|
||||||
|
@ -620,16 +620,16 @@ class ArchiveRoute extends PageRouteInfo<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [AssetSelectionPage]
|
/// [AlbumAssetSelectionPage]
|
||||||
class AssetSelectionRoute extends PageRouteInfo<AssetSelectionRouteArgs> {
|
class AlbumAssetSelectionRoute extends PageRouteInfo<AssetSelectionRouteArgs> {
|
||||||
AssetSelectionRoute({
|
AlbumAssetSelectionRoute({
|
||||||
Key? key,
|
Key? key,
|
||||||
required Set<Asset> existingAssets,
|
required Set<Asset> existingAssets,
|
||||||
bool canDeselect = false,
|
bool canDeselect = false,
|
||||||
required QueryBuilder<Asset, Asset, QAfterSortBy>? query,
|
required QueryBuilder<Asset, Asset, QAfterSortBy>? query,
|
||||||
List<PageRouteInfo>? children,
|
List<PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
AssetSelectionRoute.name,
|
AlbumAssetSelectionRoute.name,
|
||||||
args: AssetSelectionRouteArgs(
|
args: AssetSelectionRouteArgs(
|
||||||
key: key,
|
key: key,
|
||||||
existingAssets: existingAssets,
|
existingAssets: existingAssets,
|
||||||
|
@ -639,7 +639,7 @@ class AssetSelectionRoute extends PageRouteInfo<AssetSelectionRouteArgs> {
|
||||||
initialChildren: children,
|
initialChildren: children,
|
||||||
);
|
);
|
||||||
|
|
||||||
static const String name = 'AssetSelectionRoute';
|
static const String name = 'AlbumAssetSelectionRoute';
|
||||||
|
|
||||||
static const PageInfo<AssetSelectionRouteArgs> page =
|
static const PageInfo<AssetSelectionRouteArgs> page =
|
||||||
PageInfo<AssetSelectionRouteArgs>(name);
|
PageInfo<AssetSelectionRouteArgs>(name);
|
||||||
|
@ -853,15 +853,15 @@ class GalleryViewerRouteArgs {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [HomePage]
|
/// [PhotosPage]
|
||||||
class HomeRoute extends PageRouteInfo<void> {
|
class PhotosRoute extends PageRouteInfo<void> {
|
||||||
const HomeRoute({List<PageRouteInfo>? children})
|
const PhotosRoute({List<PageRouteInfo>? children})
|
||||||
: super(
|
: super(
|
||||||
HomeRoute.name,
|
PhotosRoute.name,
|
||||||
initialChildren: children,
|
initialChildren: children,
|
||||||
);
|
);
|
||||||
|
|
||||||
static const String name = 'HomeRoute';
|
static const String name = 'PhotosRoute';
|
||||||
|
|
||||||
static const PageInfo<void> page = PageInfo<void>(name);
|
static const PageInfo<void> page = PageInfo<void>(name);
|
||||||
}
|
}
|
||||||
|
@ -1164,15 +1164,15 @@ class SearchRoute extends PageRouteInfo<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [SelectAdditionalUserForSharingPage]
|
/// [AlbumAdditionalSharedUserSelectionPage]
|
||||||
class SelectAdditionalUserForSharingRoute
|
class AlbumAdditionalSharedUserSelectionRoute
|
||||||
extends PageRouteInfo<SelectAdditionalUserForSharingRouteArgs> {
|
extends PageRouteInfo<SelectAdditionalUserForSharingRouteArgs> {
|
||||||
SelectAdditionalUserForSharingRoute({
|
AlbumAdditionalSharedUserSelectionRoute({
|
||||||
Key? key,
|
Key? key,
|
||||||
required Album album,
|
required Album album,
|
||||||
List<PageRouteInfo>? children,
|
List<PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
SelectAdditionalUserForSharingRoute.name,
|
AlbumAdditionalSharedUserSelectionRoute.name,
|
||||||
args: SelectAdditionalUserForSharingRouteArgs(
|
args: SelectAdditionalUserForSharingRouteArgs(
|
||||||
key: key,
|
key: key,
|
||||||
album: album,
|
album: album,
|
||||||
|
@ -1180,7 +1180,7 @@ class SelectAdditionalUserForSharingRoute
|
||||||
initialChildren: children,
|
initialChildren: children,
|
||||||
);
|
);
|
||||||
|
|
||||||
static const String name = 'SelectAdditionalUserForSharingRoute';
|
static const String name = 'AlbumAdditionalSharedUserSelectionRoute';
|
||||||
|
|
||||||
static const PageInfo<SelectAdditionalUserForSharingRouteArgs> page =
|
static const PageInfo<SelectAdditionalUserForSharingRouteArgs> page =
|
||||||
PageInfo<SelectAdditionalUserForSharingRouteArgs>(name);
|
PageInfo<SelectAdditionalUserForSharingRouteArgs>(name);
|
||||||
|
@ -1203,15 +1203,15 @@ class SelectAdditionalUserForSharingRouteArgs {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [SelectUserForSharingPage]
|
/// [AlbumSharedUserSelectionPage]
|
||||||
class SelectUserForSharingRoute
|
class AlbumSharedUserSelectionRoute
|
||||||
extends PageRouteInfo<SelectUserForSharingRouteArgs> {
|
extends PageRouteInfo<SelectUserForSharingRouteArgs> {
|
||||||
SelectUserForSharingRoute({
|
AlbumSharedUserSelectionRoute({
|
||||||
Key? key,
|
Key? key,
|
||||||
required Set<Asset> assets,
|
required Set<Asset> assets,
|
||||||
List<PageRouteInfo>? children,
|
List<PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
SelectUserForSharingRoute.name,
|
AlbumSharedUserSelectionRoute.name,
|
||||||
args: SelectUserForSharingRouteArgs(
|
args: SelectUserForSharingRouteArgs(
|
||||||
key: key,
|
key: key,
|
||||||
assets: assets,
|
assets: assets,
|
||||||
|
@ -1219,7 +1219,7 @@ class SelectUserForSharingRoute
|
||||||
initialChildren: children,
|
initialChildren: children,
|
||||||
);
|
);
|
||||||
|
|
||||||
static const String name = 'SelectUserForSharingRoute';
|
static const String name = 'AlbumSharedUserSelectionRoute';
|
||||||
|
|
||||||
static const PageInfo<SelectUserForSharingRouteArgs> page =
|
static const PageInfo<SelectUserForSharingRouteArgs> page =
|
||||||
PageInfo<SelectUserForSharingRouteArgs>(name);
|
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/providers/user.provider.dart';
|
||||||
import 'package:immich_mobile/shared/ui/immich_loading_indicator.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/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';
|
import 'package:immich_mobile/utils/selection_handlers.dart';
|
||||||
|
|
||||||
class MultiselectGrid extends HookConsumerWidget {
|
class MultiselectGrid extends HookConsumerWidget {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:immich_mobile/models/activities/activity.model.dart';
|
import 'package:immich_mobile/models/activities/activity.model.dart';
|
||||||
import 'package:immich_mobile/providers/activity.provider.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/activity_text_field.dart';
|
||||||
import 'package:immich_mobile/modules/activities/widgets/dismissible_activity.dart';
|
import 'package:immich_mobile/modules/activities/widgets/dismissible_activity.dart';
|
||||||
import 'package:immich_mobile/providers/album/current_album.provider.dart';
|
import 'package:immich_mobile/providers/album/current_album.provider.dart';
|
||||||
|
|
Loading…
Reference in a new issue