0cb315ea88
CI / build (push) Has been cancelled
Event photos can now be opened in Lumenroom, a WebGL2 develop module, from the photo editor's Advanced button. The dashboard signs a short-lived token scoped to one user and event; Lumenroom exchanges it, imports the event's photo list and proxies bytes on demand, so nothing is copied and the temporary catalog expires with the bridge session. Saving in Lumenroom renders the photo and writes it back as the event's edited JPEG, with the advanced recipe kept in event_photos.advanced_edit_json. Lumenroom is vendored under lumenroom/ and built as a second compose service, so one clone and `docker compose up -d --build` deploys both apps. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
35 lines
786 B
TypeScript
35 lines
786 B
TypeScript
/**
|
|
* Drag payloads live in a module variable because browsers only expose
|
|
* `dataTransfer.getData` on drop, not during dragover — and we need to know
|
|
* whether a photo (rather than an OS file) is being dragged while hovering.
|
|
*/
|
|
|
|
let photoIds: string[] = [];
|
|
let eventId: string | null = null;
|
|
|
|
export const PHOTO_DRAG = 'application/x-lumen-photos';
|
|
export const EVENT_DRAG = 'application/x-lumen-event';
|
|
|
|
export function startPhotoDrag(ids: string[]) {
|
|
photoIds = ids;
|
|
eventId = null;
|
|
}
|
|
|
|
export function draggedPhotoIds(): string[] {
|
|
return photoIds;
|
|
}
|
|
|
|
export function startEventDrag(id: string) {
|
|
eventId = id;
|
|
photoIds = [];
|
|
}
|
|
|
|
export function draggedEventId(): string | null {
|
|
return eventId;
|
|
}
|
|
|
|
export function endDrag() {
|
|
photoIds = [];
|
|
eventId = null;
|
|
}
|