feat: owner review 2 phase 3: Library on the web panel, photo trash and web upload (#11)
CI / Build and test (push) Successful in 7m25s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 10s
CI / PostgreSQL 16 integration (push) Successful in 5m20s
CI / PostgreSQL 17 integration (push) Successful in 5m22s
CI / Docker image (push) Successful in 50s
Release / Build, test and publish (push) Successful in 12m1s
Release / Server image (push) Successful in 1m26s

- Web panel Library: browse, view, delete sequences and photos, mass operations (analyse, proxies, thumbnails, verify, retag, delete, CSV). It never edits the video.
- Photo trash with tombstones (migration 0008): crash-safe delete and restore, hash-checked restore with reasons, and emptying only by an explicit fingerprinted job. Sync and uploads keep deleted photos deleted; an explicit "Upload again" brings one back.
- Upload from the web panel: in-house SHA-256 in a worker with a fail-closed self-test, capture time from EXIF, chunked, resumable; no folders.
- Desktop trash dialog with photo entries and Empty.
- Admin files are revalidated (no-cache + ETag).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #11.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-10-27 15:08:39 +01:00
1 parent af9eeaab9b
commit 9aa818ed47
283 files changed
+24922 -293

No files matched your search

+129
View File
@@ -25,6 +25,8 @@
--error: light-dark(#c42b1c, #f0625d);
--shadow: light-dark(rgba(0, 0, 0, .18), rgba(0, 0, 0, .4));
--scrim: light-dark(rgba(0, 0, 0, .25), rgba(0, 0, 0, .6));
/* Badges drawn over photos (counts, numbers, the cover mark) read the same on light and dark pages. */
--on-photo: rgba(0, 0, 0, .6);
--radius: 6px;
--radius-card: 8px;
--font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
@@ -293,6 +295,133 @@ dialog.dialog p { margin: 0; color: var(--text-muted); }
.toast { width: 420px; max-width: calc(100vw - 48px); padding: 12px 14px; color: var(--text); background: var(--card); border: 1px solid var(--stroke); border-inline-start: 3px solid var(--accent); border-radius: var(--radius-card); box-shadow: 0 4px 16px var(--shadow); }
.toast.error { border-inline-start-color: var(--error); }
/* Directional glyphs (icons.js) point along the reading direction; inside a left-to-right island (photos, time) they do not turn. */
svg.directional:dir(rtl) { transform: scaleX(-1); }
.btn svg, .tag svg { flex: none; }
dialog.dialog .dialog-list { margin: 0; padding-block: 8px; padding-inline: 28px 12px; max-height: 200px; overflow: auto; border: 1px solid var(--stroke);
border-radius: var(--radius); background: var(--bg); font-size: 12px; overflow-wrap: anywhere; }
dialog.dialog .dialog-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
dialog.dialog .field-label strong { color: var(--text); }
/* Library (owner review 2, R6): toolbar, cards (DESIGN §4: 16:9 thumbnail, count badge, check box on hover or selection,
selected = accent border and glow), list rows, the selection's bar, a sequence's photos and the photo viewer. */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar .input.small { height: 32px; max-width: 200px; }
.toolbar select.active { border-color: var(--accent); color: var(--accent); }
.seq-items { min-width: 0; }
.seq-items.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 16px; padding: 16px; }
.seq-items > .empty { grid-column: 1 / -1; }
/* Shift+click picks a range: it selects no text. */
.seq-card, .seq-row, .frame { position: relative; cursor: pointer; outline: none; user-select: none; }
.seq-card { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius-card); overflow: hidden; }
.seq-card:hover { border-color: var(--stroke-strong); }
.seq-card:focus-visible, .seq-row:focus-visible, .frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seq-card[aria-selected="true"], .frame[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-selected); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--card-pressed); overflow: hidden; }
.thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-faint); }
.thumb .placeholder svg { width: 28px; height: 28px; }
.thumb img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb img.failed { visibility: hidden; }
.seq-check { position: absolute; top: 8px; inset-inline-start: 8px; width: 18px; height: 18px; z-index: 1; opacity: 0; cursor: pointer; }
.seq-card:hover .seq-check, .seq-card:focus-visible .seq-check, .frame:hover .seq-check, .frame:focus-visible .seq-check,
.selecting .seq-check, [aria-selected="true"] > .seq-check { opacity: 1; }
.seq-card .count { position: absolute; top: 8px; inset-inline-end: 8px; padding: 0 6px; border-radius: 8px; background: var(--on-photo); color: #fff; font-size: 11px; }
.seq-card .info { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; min-width: 0; }
.seq-card .facts { font-size: 12px; color: var(--text-muted); }
.chips-row { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; color: var(--text-muted); }
.st { white-space: nowrap; }
.st.ok { color: var(--success); }
.st.off { color: var(--text-faint); }
.st.warn { color: var(--warning); }
.st.err { color: var(--error); }
/* List: the rows are one grid's subgrids, so every column fits its widest cell (as .table). */
.seq-items.rows { display: grid; grid-template-columns: max-content 64px minmax(160px, 2fr) minmax(80px, 1fr) max-content max-content max-content; column-gap: 12px; }
.seq-items.rows > .seq-head, .seq-items.rows > .seq-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding: 0 18px; }
.seq-items.rows > .seq-head { font-size: 11px; color: var(--text-muted); padding-block: 10px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.seq-items.rows > .empty { grid-column: 1 / -1; }
.seq-row { min-height: 52px; border-bottom: 1px solid var(--stroke); }
.seq-row:hover { background: var(--card-hover); }
.seq-row[aria-selected="true"] { background: var(--accent-selected); }
.seq-row .seq-check { position: static; opacity: 1; }
.seq-row .thumb { width: 64px; border-radius: 4px; }
.seq-row .thumb .placeholder svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
.seq-items.rows { grid-template-columns: max-content 64px minmax(120px, 1fr) max-content; }
.seq-items.rows .col-camera, .seq-items.rows .col-size, .seq-items.rows .col-date { display: none; }
}
/* The selection's actions stay in view at the foot of the window while the list scrolls. */
.mass-bar { position: sticky; bottom: 16px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px;
background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius-card); box-shadow: 0 4px 16px var(--shadow); }
/* A sequence: cover, editable fields and facts side by side, stacked on narrow screens. */
.seq-detail { grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) minmax(220px, 320px); gap: 20px; align-items: start; }
.seq-cover .thumb { border-radius: var(--radius); }
.input.heading { height: 38px; font-size: 18px; font-weight: 600; border-color: transparent; background: transparent; padding-inline: 8px; margin-inline-start: -8px; }
.input.heading:hover { border-color: var(--stroke); }
.input.heading:focus { background: var(--card); }
textarea.input.notes { height: auto; min-height: 64px; padding: 6px 10px; resize: vertical; font: inherit; }
.tag-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag-list { display: contents; }
.tag { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding-inline: 10px 2px; border: 1px solid var(--stroke); border-radius: 12px; background: var(--card); color: var(--text); font-size: 12px; }
.tag-editor .input.small { width: 140px; }
.btn.tiny { width: 20px; min-width: 20px; height: 20px; border-radius: 10px; }
.btn.tiny svg { width: 12px; height: 12px; }
.stars { display: flex; gap: 2px; }
.btn.star { color: var(--text-faint); }
.btn.star[aria-pressed="true"] { color: var(--sun); border-color: transparent; box-shadow: none; }
.seq-facts, .viewer-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 12px; }
.seq-facts > div, .viewer-meta > div { display: contents; }
.seq-facts dt, .viewer-meta dt { color: var(--text-muted); }
.seq-facts dd, .viewer-meta dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.panel-head.wrap { flex-wrap: wrap; }
.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 12px 18px; }
.frame-grid > .frame-empty { grid-column: 1 / -1; }
/* Thousands of photos: the browser lays out and paints only those near the view. */
.frame { content-visibility: auto; contain-intrinsic-size: auto 90px; border: 1px solid var(--stroke); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.frame .thumb { aspect-ratio: 3 / 2; }
.frame-no { position: absolute; bottom: 4px; inset-inline-end: 4px; padding: 0 5px; border-radius: 6px; background: var(--on-photo); color: #fff; font-size: 10px; }
.frame-badge { position: absolute; top: 4px; inset-inline-end: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 11px; background: var(--on-photo); color: #fff; }
.frame-badge.hero { color: var(--sun); }
.frame-badge.warn { top: auto; bottom: 4px; inset-inline: 4px auto; color: var(--warning); }
.table.renders { grid-template-columns: minmax(100px, 1.4fr) max-content max-content max-content max-content max-content; }
.table.trash { grid-template-columns: max-content minmax(140px, 2fr) max-content max-content minmax(60px, 1fr) max-content max-content; }
.table.trash.fit-1 { grid-template-columns: max-content minmax(120px, 2fr) max-content max-content max-content max-content; }
.table.trash.fit-1 .col-by { display: none; }
dialog.viewer { width: min(1100px, calc(100vw - 32px)); padding: 16px 18px; }
dialog.viewer[open] { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px 16px; }
.viewer-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.viewer-stage { position: relative; display: grid; place-items: center; min-height: 240px; max-height: 72vh; background: #000; border-radius: var(--radius); overflow: hidden; }
.viewer-stage img { max-width: 100%; max-height: 72vh; object-fit: contain; display: block; }
.viewer-stage img.failed { display: none; }
.viewer-stage .placeholder { position: absolute; color: var(--text-faint); }
.viewer-stage img:not(.failed) + .placeholder { display: none; }
.viewer-meta { align-content: start; }
dialog.viewer .buttons { grid-column: 1 / -1; }
@media (max-width: 900px) {
.seq-detail { grid-template-columns: minmax(0, 1fr); }
dialog.viewer[open] { grid-template-columns: minmax(0, 1fr); }
}
@media (forced-colors: active) {
.seq-card[aria-selected="true"], .frame[aria-selected="true"], .seq-row[aria-selected="true"] { outline: 3px solid Highlight; }
}
/* Upload dialog (owner review 2, R3, upload.js): the target, a drop zone, the photos with their state, the total. */
dialog.dialog.upload { width: 640px; }
.upload-choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.upload-choice legend { color: var(--text-muted); padding: 0; margin-block-end: 8px; }
.upload-existing { display: grid; gap: 8px; margin-block-start: 10px; }
.upload-new { display: grid; gap: 6px; margin-block-start: 10px; color: var(--text-muted); }
.input.list { height: auto; padding: 4px 0; }
.input.list option { padding: 3px 10px; }
.drop { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px dashed var(--stroke-strong); border-radius: var(--radius-card); color: var(--text-muted); }
dialog.upload.dragging .drop { border-color: var(--accent); background: var(--accent-selected); color: var(--text); }
.upload-files { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) max-content minmax(110px, 170px) 28px; column-gap: 12px; align-content: start; }
.upload-file { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; min-height: 36px; border-bottom: 1px solid var(--stroke); }
.upload-file .status { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; }
.upload-file .status svg.bar { flex: 1 1 0; min-width: 24px; }
.upload-file .btn.icon.small { width: 28px; min-width: 28px; }
.upload-total { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.upload-total .progress-cell { flex: 1 1 0; }
/* About: the last group of Settings (owner review 2); #/about scrolls to it below the sticky header and focuses its heading. */
.about { scroll-margin-block-start: 84px; }
.about h2:focus { outline: none; }