feat: redesign dashboard, add lightbox bulk download, and standardize ui

This commit is contained in:
Leon Tonhäuser committed 2026-08-11 11:18:39 +02:00
1 parent 8728308fc6
commit 4a9da65901
13 files changed
+923 -104

No files matched your search

+19 -7
View File
@@ -57,11 +57,13 @@ export type UsageRepository = {
};
type UsageImmich = {
listAlbumsForAsset(assetId: string): Promise<ImmichAlbumSummary[]>;
getAlbum(albumId: string): Promise<{ id: string; albumName: string }>;
getAsset(assetId: string): Promise<{
id: string;
type: string;
originalFileName: string;
originalMimeType: string;
type: string;
albums: Array<{ id: string }>;
}>;
};
@@ -330,15 +332,25 @@ async function loadRequestedAlbum(
immich: UsageImmich,
assetId: string,
albumId: string,
): Promise<ImmichAlbumSummary> {
let albums: ImmichAlbumSummary[];
): Promise<{ id: string; albumName: string }> {
let asset;
try {
albums = await immich.listAlbumsForAsset(assetId);
asset = await immich.getAsset(assetId);
} catch {
throw new UsageAccountingError("IMMICH_UNAVAILABLE");
}
const album = albums.find((candidate) => candidate.id === albumId);
if (!album) throw new UsageAccountingError("ASSET_NOT_IN_ALBUM");
if (!asset.albums.some((a) => a.id === albumId)) {
throw new UsageAccountingError("ASSET_NOT_IN_ALBUM");
}
let album;
try {
album = await immich.getAlbum(albumId);
} catch {
throw new UsageAccountingError("IMMICH_UNAVAILABLE");
}
return album;
}