feat: view shared links inside of mobile app

This commit is contained in:
bwees 2025-07-31 13:38:14 -05:00
parent f972b8d514
commit c8c6f86518
No known key found for this signature in database
20 changed files with 434 additions and 61 deletions

View file

@ -1,3 +1,5 @@
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
import 'package:immich_mobile/repositories/asset_api.repository.dart';
import 'package:openapi/api.dart';
enum SharedLinkSource { album, individual }
@ -14,6 +16,8 @@ class SharedLink {
final String key;
final bool showMetadata;
final SharedLinkSource type;
final List<RemoteAsset> assets;
final String? albumId;
const SharedLink({
required this.id,
@ -27,6 +31,8 @@ class SharedLink {
required this.key,
required this.showMetadata,
required this.type,
this.assets = const [],
this.albumId,
});
SharedLink copyWith({
@ -74,7 +80,9 @@ class SharedLink {
? dto.album?.albumThumbnailAssetId
: dto.assets.isNotEmpty
? dto.assets[0].id
: null;
: null,
assets = dto.assets.map((asset) => asset.toDto()).toList(),
albumId = dto.album?.id;
@override
String toString() =>