feat: photo/video capture-date pipeline + premium UI/UX overhaul

Backend — Photos timeline now groups by real capture date instead of upload time. New MediaMetadataService (FileLifecycleHook) extracts EXIF DateTimeOriginal from images and container creation_time from videos (mov/mp4/mkv) via nom-exif, timezone-correct (OffsetTimeOriginal), persisting captured_at so the existing media_sort_date trigger takes over. Adds POST /admin/photos/metadata/reextract to backfill existing media. Falls back to upload date when no embedded date exists.

Frontend — premium grid cards: combined metadata line (relative date · size, owner avatar when shared), custom selection checkbox with a clear checked state, uniform full-width 4:3 thumbnail tiles independent of filename length, centered file-type icons, and a hit-test fix so checkbox/star/kebab clicks reach the controls (the decorative thumbnail no longer captures pointer events). Notification messages internationalised across all 16 locales. Broader polish: design tokens, a11y/focus-visible states, brand + PWA assets.

Chore — bump semver-compatible dependencies (cargo upgrade); add nom-exif 3.6.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
DioCrafts
2026-06-15 00:17:17 +02:00
parent dac299fea6
commit 81a93a489b
129 changed files with 8194 additions and 2473 deletions
+58 -31
View File
@@ -27,7 +27,7 @@
height: 90%;
max-width: 1200px;
background-color: var(--color-bg-surface);
border-radius: 8px;
border-radius: var(--radius-lg);
overflow: hidden;
display: flex;
flex-direction: column;
@@ -38,14 +38,14 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
padding: var(--space-3) var(--space-4);
background-color: var(--color-bg-subtle);
border-bottom: 1px solid var(--color-border);
}
.inline-viewer-title {
font-size: 18px;
font-weight: 500;
font-size: var(--text-lg);
font-weight: var(--weight-medium);
color: var(--color-text);
white-space: nowrap;
overflow: hidden;
@@ -55,7 +55,7 @@
.inline-viewer-close {
background: none;
border: none;
font-size: 18px;
font-size: var(--text-lg);
cursor: pointer;
color: var(--color-text-muted);
width: 36px;
@@ -86,7 +86,7 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
padding: var(--space-3) var(--space-4);
background-color: var(--color-bg-subtle);
border-top: 1px solid var(--color-border);
}
@@ -95,14 +95,14 @@
background-color: var(--color-accent);
color: var(--color-danger-text);
border: none;
border-radius: 4px;
padding: 8px 16px;
font-size: 14px;
font-weight: 500;
border-radius: var(--radius-sm);
padding: var(--space-2) var(--space-4);
font-size: var(--text-base);
font-weight: var(--weight-medium);
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
gap: var(--space-2);
transition: background-color 0.2s;
}
@@ -112,13 +112,13 @@
.inline-viewer-controls {
display: flex;
gap: 8px;
gap: var(--space-2);
}
.inline-viewer-controls button {
background-color: var(--color-border-light);
border: 1px solid var(--color-border-medium);
border-radius: 4px;
border-radius: var(--radius-sm);
width: 36px;
height: 36px;
display: flex;
@@ -138,11 +138,38 @@
.inline-viewer-image {
max-width: 100%;
max-height: 100%;
/* The image is a flex item; without min-* = 0 the flexbox `min-width: auto`
default keeps it at its natural size, so `max-width: 100%` is ignored and
wide images overflow → a stray horizontal scrollbar and the picture only
partly visible (looked like it "repeated" while scrolling). */
min-width: 0;
min-height: 0;
object-fit: contain;
transform-origin: center;
transition: transform 0.2s ease;
}
/* Subtle, thin scrollbar inside the viewer (shown only when zoomed in to pan) —
replaces the heavy global accent scrollbar. */
.inline-viewer-container {
scrollbar-width: thin;
scrollbar-color: var(--color-border-medium) transparent;
}
.inline-viewer-container::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.inline-viewer-container::-webkit-scrollbar-thumb {
background: var(--color-border-medium);
border-radius: var(--radius-full);
}
.inline-viewer-container::-webkit-scrollbar-track {
background: transparent;
}
/* PDF viewer */
.inline-viewer-pdf,
.inline-viewer-pdf-fallback {
@@ -176,10 +203,10 @@
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
padding: 20px;
gap: var(--space-3);
padding: var(--space-5);
background: var(--color-progress-overlay);
border-radius: 8px;
border-radius: var(--radius-lg);
box-shadow: 0 2px 8px var(--color-shadow);
}
@@ -188,7 +215,7 @@
width: 200px;
height: 8px;
background: var(--color-border);
border-radius: 4px;
border-radius: var(--radius-sm);
overflow: hidden;
}
@@ -196,21 +223,21 @@
.inline-viewer-progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--color-info-blue), var(--color-admin-blue));
border-radius: 4px;
border-radius: var(--radius-sm);
transition: width 0.2s ease;
}
/* Progress percentage text */
.inline-viewer-progress-text {
font-size: 14px;
font-weight: 600;
font-size: var(--text-base);
font-weight: var(--weight-semibold);
color: var(--color-text-secondary);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* Error and unsupported message */
.inline-viewer-message {
padding: 32px;
padding: var(--space-8);
text-align: center;
max-width: 400px;
}
@@ -218,7 +245,7 @@
.inline-viewer-icon {
font-size: 64px;
color: var(--color-text-dark);
margin-bottom: 24px;
margin-bottom: var(--space-6);
}
.inline-viewer-text {
@@ -227,7 +254,7 @@
}
.inline-viewer-text p {
margin: 0 0 16px;
margin: 0 0 var(--space-4);
}
/* Text viewer */
@@ -235,9 +262,9 @@
width: 100%;
height: 100%;
margin: 0;
padding: 16px 24px;
padding: var(--space-4) var(--space-6);
font-family: "Courier New", Consolas, Monaco, monospace;
font-size: 14px;
font-size: var(--text-base);
line-height: 1.6;
color: var(--color-text);
background-color: var(--color-bg-surface);
@@ -254,7 +281,7 @@
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 4px;
border-radius: var(--radius-sm);
background-color: var(--color-black);
}
@@ -264,8 +291,8 @@
flex-direction: column;
align-items: center;
justify-content: center;
gap: 24px;
padding: 48px 32px;
gap: var(--space-6);
padding: var(--space-12) var(--space-8);
max-width: 500px;
width: 100%;
}
@@ -289,8 +316,8 @@
}
.inline-viewer-audio-name {
font-size: 16px;
font-weight: 500;
font-size: var(--text-md);
font-weight: var(--weight-medium);
color: var(--color-text-secondary);
text-align: center;
word-break: break-word;
@@ -300,7 +327,7 @@
.inline-viewer-audio {
width: 100%;
max-width: 460px;
border-radius: 8px;
border-radius: var(--radius-lg);
outline: none;
}