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
+56 -53
View File
@@ -13,61 +13,61 @@
display: flex;
align-items: center;
justify-content: flex-end;
padding: 8px 8px 4px;
padding: var(--space-2) var(--space-2) var(--space-1);
}
/* Toggle buttons — wider for text labels */
.photos-toolbar .toggle-btn {
width: auto;
padding: 0 14px;
font-size: 13px;
font-weight: 500;
padding: 0 var(--space-3-5);
font-size: var(--text-sm);
font-weight: var(--weight-medium);
}
/* Group header */
.photos-day-header {
padding: 16px 8px 10px;
padding: var(--space-4) var(--space-2) var(--space-2-5);
font-size: 15px;
font-weight: 600;
font-weight: var(--weight-semibold);
color: var(--color-text);
}
.photos-day-header .photos-day-count {
font-weight: 400;
font-weight: var(--weight-normal);
color: var(--color-text-faint);
font-size: 13px;
margin-left: 8px;
font-size: var(--text-sm);
margin-left: var(--space-2);
}
/* Photo grid — base (daily mode) */
.photos-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 12px;
padding: 0 8px;
margin-bottom: 16px;
gap: var(--space-3);
padding: 0 var(--space-2);
margin-bottom: var(--space-4);
}
/* Monthly mode — larger tiles, more breathing room */
.photos-group-monthly .photos-grid {
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 14px;
gap: var(--space-3-5);
}
.photos-group-monthly .photos-day-header {
font-size: 17px;
padding: 20px 8px 12px;
padding: var(--space-5) var(--space-2) var(--space-3);
}
/* Yearly mode — smaller tiles, more items visible */
.photos-group-yearly .photos-grid {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
gap: var(--space-2-5);
}
.photos-group-yearly .photos-day-header {
font-size: 20px;
padding: 24px 8px 14px;
font-size: var(--text-xl);
padding: var(--space-6) var(--space-2) var(--space-3-5);
}
/* Individual photo tile */
@@ -75,10 +75,10 @@
position: relative;
aspect-ratio: 1;
overflow: hidden;
border-radius: 12px;
border-radius: var(--radius-2xl);
border: 2px solid var(--color-border);
cursor: pointer;
background: var(--color-bg-surface);
background: var(--color-bg-muted);
box-shadow: 0 1px 3px var(--color-shadow-xs);
transition:
transform 0.2s ease,
@@ -90,8 +90,15 @@
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 10px;
transition: transform 0.2s ease;
border-radius: var(--radius-xl);
opacity: 0;
transition:
opacity 0.4s ease,
transform 0.2s ease;
}
.photo-tile img.is-loaded {
opacity: 1;
}
.photo-tile:hover {
@@ -120,7 +127,7 @@
align-items: center;
justify-content: center;
color: var(--color-danger-text);
font-size: 11px;
font-size: var(--text-2xs);
z-index: 2;
}
@@ -159,7 +166,7 @@
align-items: center;
justify-content: center;
color: var(--color-danger-text);
font-size: 12px;
font-size: var(--text-xs);
z-index: 2;
}
@@ -168,11 +175,11 @@
position: absolute;
bottom: 6px;
left: 6px;
font-size: 11px;
font-size: var(--text-2xs);
color: var(--color-danger-text);
background: var(--color-overlay-video);
padding: 2px 6px;
border-radius: 4px;
padding: var(--space-0-5) var(--space-1-5);
border-radius: var(--radius-sm);
z-index: 2;
}
@@ -182,25 +189,25 @@
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80px 20px;
padding: var(--space-20) var(--space-5);
text-align: center;
color: var(--color-text-faint);
}
.photos-empty i {
font-size: 56px;
margin-bottom: 16px;
margin-bottom: var(--space-4);
color: var(--color-border-medium);
}
.photos-empty p {
margin: 4px 0;
margin: var(--space-1) 0;
font-size: 15px;
}
.photos-empty .photos-empty-title {
font-size: 18px;
font-weight: 600;
font-size: var(--text-lg);
font-weight: var(--weight-semibold);
color: var(--color-text-subtle);
}
@@ -215,21 +222,17 @@
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
padding: var(--space-6);
color: var(--color-text-faint);
font-size: 14px;
gap: 8px;
font-size: var(--text-base);
gap: var(--space-2);
}
.photos-loading i {
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* @keyframes spin → base/animations.css (canonical, loaded via main.css). */
/* Selection bar */
.photos-selection-bar {
@@ -239,14 +242,14 @@
transform: translateX(-50%);
background: var(--color-multiselect-bg);
color: var(--color-multiselect-text);
padding: 10px 20px;
border-radius: 12px;
padding: var(--space-2-5) var(--space-5);
border-radius: var(--radius-2xl);
display: flex;
align-items: center;
gap: 16px;
gap: var(--space-4);
box-shadow: 0 8px 30px var(--color-shadow-3xl);
z-index: 1000;
font-size: 14px;
font-size: var(--text-base);
}
.photos-selection-bar button {
@@ -254,9 +257,9 @@
border: none;
color: var(--color-multiselect-text);
cursor: pointer;
padding: 6px 10px;
border-radius: 6px;
font-size: 14px;
padding: var(--space-1-5) var(--space-2-5);
border-radius: var(--radius-md);
font-size: var(--text-base);
transition: background 0.15s;
}
@@ -265,16 +268,16 @@
}
.photos-selection-bar .selection-count {
font-weight: 600;
font-weight: var(--weight-semibold);
}
/* Responsive */
@media (max-width: 768px) {
.photos-grid {
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 2px;
padding: 0 2px;
margin-bottom: 8px;
gap: var(--space-0-5);
padding: 0 var(--space-0-5);
margin-bottom: var(--space-2);
}
.photos-group-monthly .photos-grid {
@@ -290,11 +293,11 @@
}
.photos-day-header {
font-size: 14px;
padding: 10px 4px 6px;
font-size: var(--text-base);
padding: var(--space-2-5) var(--space-1) var(--space-1-5);
}
.photos-toolbar {
padding: 6px 4px 2px;
padding: var(--space-1-5) var(--space-1) var(--space-0-5);
}
}