mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
feat(mobile): share to mechanism (#15229)
* setup ios * chore: succesfully sent media to the app * share from Android * wip: navigate to share screen * wip: UI for displaying upload candidate * wip: logic * wip: upload logic * wip: up up up we got it up * wip * wip * wip * upload state * feat: i18n * fix: release build ios' * feat: clear file cache * pr feedback * using const for checking download status --------- Co-authored-by: Alex <alex@pop-os.localdomain>
This commit is contained in:
parent
3a2bf91889
commit
fd99bd05cf
33 changed files with 1368 additions and 55 deletions
mobile/lib/routing
|
@ -8,6 +8,7 @@ import 'package:immich_mobile/entities/user.entity.dart';
|
|||
import 'package:immich_mobile/models/memories/memory.model.dart';
|
||||
import 'package:immich_mobile/models/search/search_filter.model.dart';
|
||||
import 'package:immich_mobile/models/shared_link/shared_link.model.dart';
|
||||
import 'package:immich_mobile/models/upload/share_intent_attachment.model.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';
|
||||
|
@ -57,6 +58,7 @@ import 'package:immich_mobile/pages/library/partner/partner.page.dart';
|
|||
import 'package:immich_mobile/pages/library/partner/partner_detail.page.dart';
|
||||
import 'package:immich_mobile/pages/library/shared_link/shared_link.page.dart';
|
||||
import 'package:immich_mobile/pages/library/shared_link/shared_link_edit.page.dart';
|
||||
import 'package:immich_mobile/pages/share_intent/share_intent.page.dart';
|
||||
import 'package:immich_mobile/providers/api.provider.dart';
|
||||
import 'package:immich_mobile/providers/gallery_permission.provider.dart';
|
||||
import 'package:immich_mobile/routing/auth_guard.dart';
|
||||
|
@ -277,6 +279,10 @@ class AppRouter extends RootStackRouter {
|
|||
page: NativeVideoViewerRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
),
|
||||
AutoRoute(
|
||||
page: ShareIntentRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -136,15 +136,10 @@ class AlbumAssetSelectionRouteArgs {
|
|||
|
||||
/// generated route for
|
||||
/// [AlbumOptionsPage]
|
||||
class AlbumOptionsRoute extends PageRouteInfo<AlbumOptionsRouteArgs> {
|
||||
AlbumOptionsRoute({
|
||||
Key? key,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
class AlbumOptionsRoute extends PageRouteInfo<void> {
|
||||
const AlbumOptionsRoute({List<PageRouteInfo>? children})
|
||||
: super(
|
||||
AlbumOptionsRoute.name,
|
||||
args: AlbumOptionsRouteArgs(
|
||||
key: key,
|
||||
),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
|
@ -153,25 +148,11 @@ class AlbumOptionsRoute extends PageRouteInfo<AlbumOptionsRouteArgs> {
|
|||
static PageInfo page = PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<AlbumOptionsRouteArgs>();
|
||||
return AlbumOptionsPage(
|
||||
key: args.key,
|
||||
);
|
||||
return const AlbumOptionsPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class AlbumOptionsRouteArgs {
|
||||
const AlbumOptionsRouteArgs({this.key});
|
||||
|
||||
final Key? key;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AlbumOptionsRouteArgs{key: $key}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [AlbumPreviewPage]
|
||||
class AlbumPreviewRoute extends PageRouteInfo<AlbumPreviewRouteArgs> {
|
||||
|
@ -1453,6 +1434,52 @@ class SettingsSubRouteArgs {
|
|||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [ShareIntentPage]
|
||||
class ShareIntentRoute extends PageRouteInfo<ShareIntentRouteArgs> {
|
||||
ShareIntentRoute({
|
||||
Key? key,
|
||||
required List<ShareIntentAttachment> attachments,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ShareIntentRoute.name,
|
||||
args: ShareIntentRouteArgs(
|
||||
key: key,
|
||||
attachments: attachments,
|
||||
),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'ShareIntentRoute';
|
||||
|
||||
static PageInfo page = PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ShareIntentRouteArgs>();
|
||||
return ShareIntentPage(
|
||||
key: args.key,
|
||||
attachments: args.attachments,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class ShareIntentRouteArgs {
|
||||
const ShareIntentRouteArgs({
|
||||
this.key,
|
||||
required this.attachments,
|
||||
});
|
||||
|
||||
final Key? key;
|
||||
|
||||
final List<ShareIntentAttachment> attachments;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ShareIntentRouteArgs{key: $key, attachments: $attachments}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [SharedLinkEditPage]
|
||||
class SharedLinkEditRoute extends PageRouteInfo<SharedLinkEditRouteArgs> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue