Add friendly aliases for client proofing links

This commit is contained in:
2026-10-04 15:49:06 +03:00
parent c172d170ae
commit 15dcbf904e
6 changed files with 350 additions and 110 deletions

View File

@@ -19,6 +19,7 @@ export interface AdminProofSession {
/** Null when Immich no longer has the album (or cannot be reached). */
albumName: string | null;
albumAssetCount: number | null;
alias: string | null;
/** Relative path of the client link. */
link: string;
createdAt: string;
@@ -60,7 +61,8 @@ export function toAdminSession(
albumId: session.albumId,
albumName: album?.albumName ?? null,
albumAssetCount: album ? album.assets.length : null,
link: `/proof/${session.token}`,
alias: session.alias ?? null,
link: session.alias ? `/c/${session.alias}` : `/proof/${session.token}`,
createdAt: session.createdAt,
expiresOn: session.expiresOn ?? null,
download: session.download,