Reopen advanced edits from their saved recipe, seed or take over the quick editor from them, refresh thumbnails after a save, and add an edited-only download. Also fixes the Lumenroom library collapsing to slivers on large shoots and documents deploying both containers on a new host. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -4,6 +4,17 @@ import { getAsset, putAsset } from './db';
|
||||
const CACHE_LIMIT = 6;
|
||||
const cache = new Map<string, ImageBitmap>();
|
||||
|
||||
/**
|
||||
* Grid/filmstrip thumbnail URL. The version stamp changes when the saved edit is
|
||||
* re-rendered, so the browser does not keep showing the pre-edit thumbnail.
|
||||
*/
|
||||
export function thumbSrc(photo: PhotoRecord): string {
|
||||
if (!photo.thumbUrl) return photo.thumb;
|
||||
return photo.thumbVersion
|
||||
? `${photo.thumbUrl}?v=${photo.thumbVersion}`
|
||||
: photo.thumbUrl;
|
||||
}
|
||||
|
||||
/** Where to fetch the original (or raw proxy) when it is not cached on this device. */
|
||||
export function remoteAssetUrl(photo: PhotoRecord): string {
|
||||
if (photo.raw) return photo.previewUrl || `/api/photos/${encodeURIComponent(photo.id)}/preview`;
|
||||
|
||||
Reference in New Issue
Block a user