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:
@@ -5,7 +5,7 @@
|
||||
right: 20px;
|
||||
background-color: var(--color-notification-bg);
|
||||
width: 250px;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: 0 5px 15px var(--color-shadow);
|
||||
padding: 15px;
|
||||
border-left: 4px solid var(--color-accent);
|
||||
@@ -21,14 +21,14 @@
|
||||
}
|
||||
|
||||
.notification-title {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
font-weight: var(--weight-bold);
|
||||
font-size: var(--text-base);
|
||||
margin-bottom: 5px;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.notification-message {
|
||||
font-size: 12px;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
padding: 15px 20px;
|
||||
padding: 15px var(--space-5);
|
||||
background-color: var(--color-notification-bg);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: 0 4px 12px var(--color-shadow);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -69,10 +69,10 @@
|
||||
.close-notification-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
font-size: var(--text-lg);
|
||||
cursor: pointer;
|
||||
color: var(--color-text-placeholder);
|
||||
margin-left: 10px;
|
||||
margin-left: var(--space-2-5);
|
||||
}
|
||||
|
||||
/* Notification Bell */
|
||||
@@ -84,7 +84,7 @@
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
font-size: var(--text-lg);
|
||||
color: var(--color-text-subtle);
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
@@ -113,13 +113,13 @@
|
||||
min-width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--color-notification-badge);
|
||||
color: var(--color-notification-bg);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
font-weight: var(--weight-bold);
|
||||
text-align: center;
|
||||
padding: 0 4px;
|
||||
padding: 0 var(--space-1);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
width: 380px;
|
||||
max-height: 480px;
|
||||
background: var(--color-notification-bg);
|
||||
border-radius: 16px;
|
||||
border-radius: var(--radius-3xl);
|
||||
box-shadow:
|
||||
0 12px 40px var(--color-shadow-md),
|
||||
0 0 0 1px var(--color-shadow-xs);
|
||||
@@ -192,12 +192,12 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 14px 16px;
|
||||
padding: var(--space-3-5) var(--space-4);
|
||||
border-bottom: 1px solid var(--color-border-xfaint);
|
||||
}
|
||||
|
||||
.notif-panel-title {
|
||||
font-weight: 600;
|
||||
font-weight: var(--weight-semibold);
|
||||
font-size: 15px;
|
||||
color: var(--color-text-heading);
|
||||
}
|
||||
@@ -207,9 +207,9 @@
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--color-text-faint);
|
||||
font-size: 14px;
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: var(--text-base);
|
||||
padding: var(--space-1) var(--space-2);
|
||||
border-radius: var(--radius-md);
|
||||
transition: all 0.15s;
|
||||
}
|
||||
|
||||
@@ -222,6 +222,23 @@
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
max-height: 400px;
|
||||
/* Thin, neutral scrollbar — replaces the heavy global accent bar that read
|
||||
as amateur in the panel. */
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--color-border-medium) transparent;
|
||||
}
|
||||
|
||||
.notif-panel-body::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.notif-panel-body::-webkit-scrollbar-thumb {
|
||||
background: var(--color-border-medium);
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
.notif-panel-body::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.notif-empty {
|
||||
@@ -229,25 +246,25 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px 20px;
|
||||
padding: var(--space-10) var(--space-5);
|
||||
color: var(--color-text-faint);
|
||||
gap: 8px;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.notif-empty i {
|
||||
font-size: 28px;
|
||||
font-size: var(--text-3xl);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.notif-empty span {
|
||||
font-size: 14px;
|
||||
font-size: var(--text-base);
|
||||
}
|
||||
|
||||
.notif-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 12px 16px;
|
||||
gap: 12px;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
gap: var(--space-3);
|
||||
border-bottom: 1px solid var(--color-bg-subtle);
|
||||
transition: background 0.15s;
|
||||
cursor: default;
|
||||
@@ -264,12 +281,12 @@
|
||||
.notif-item-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-lg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
font-size: 14px;
|
||||
font-size: var(--text-base);
|
||||
}
|
||||
|
||||
.notif-item-icon.upload {
|
||||
@@ -293,14 +310,14 @@
|
||||
}
|
||||
|
||||
.notif-item-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: var(--weight-semibold);
|
||||
color: var(--color-text-heading);
|
||||
margin-bottom: 2px;
|
||||
margin-bottom: var(--space-0-5);
|
||||
}
|
||||
|
||||
.notif-item-text {
|
||||
font-size: 12px;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--color-text-subtle);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -308,19 +325,19 @@
|
||||
}
|
||||
|
||||
.notif-item-time {
|
||||
font-size: 11px;
|
||||
font-size: var(--text-2xs);
|
||||
color: var(--color-text-faint);
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.notif-upload-progress {
|
||||
margin-top: 6px;
|
||||
margin-top: var(--space-1-5);
|
||||
}
|
||||
|
||||
.notif-upload-bar {
|
||||
height: 3px;
|
||||
background: var(--color-bg-empty);
|
||||
border-radius: 2px;
|
||||
border-radius: var(--radius-xs);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -329,7 +346,7 @@
|
||||
background: var(--color-accent);
|
||||
width: 0%;
|
||||
transition: width 0.2s ease;
|
||||
border-radius: 2px;
|
||||
border-radius: var(--radius-xs);
|
||||
}
|
||||
|
||||
.notif-upload-fill.done {
|
||||
@@ -349,169 +366,6 @@
|
||||
|
||||
.notif-upload-pct,
|
||||
.notif-upload-stats {
|
||||
font-size: 11px;
|
||||
font-size: var(--text-2xs);
|
||||
color: var(--color-text-faint);
|
||||
}
|
||||
|
||||
/* Upload Progress Toast (legacy — hidden, kept for compat) */
|
||||
.upload-toast {
|
||||
position: fixed;
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
width: 360px;
|
||||
max-height: 400px;
|
||||
background: var(--color-notification-bg);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 30px var(--color-shadow-md);
|
||||
z-index: 10000;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
font-family: inherit;
|
||||
animation: uploadToastSlideIn 0.3s ease-out;
|
||||
}
|
||||
|
||||
.upload-toast.visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@keyframes uploadToastSlideIn {
|
||||
from {
|
||||
transform: translateY(20px);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-toast-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
background: var(--color-accent);
|
||||
color: var(--color-danger-text);
|
||||
}
|
||||
|
||||
.upload-toast-title {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.upload-toast-close {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--color-danger-text);
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
padding: 0 4px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.upload-toast-close:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.upload-toast-body {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 8px 0;
|
||||
max-height: 260px;
|
||||
}
|
||||
|
||||
.upload-toast-file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 16px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.upload-toast-file-icon {
|
||||
font-size: 16px;
|
||||
color: var(--color-text-light);
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.upload-toast-file-icon.done {
|
||||
color: var(--color-notification-success);
|
||||
}
|
||||
|
||||
.upload-toast-file-icon.error {
|
||||
color: var(--color-notification-error);
|
||||
}
|
||||
|
||||
.upload-toast-file-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.upload-toast-file-name {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-black);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.upload-toast-file-bar {
|
||||
height: 3px;
|
||||
background: var(--color-bg-empty);
|
||||
border-radius: 2px;
|
||||
margin-top: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.upload-toast-file-fill {
|
||||
height: 100%;
|
||||
background: var(--color-accent);
|
||||
width: 0%;
|
||||
transition: width 0.2s ease;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.upload-toast-file-fill.done {
|
||||
background: var(--color-notification-success);
|
||||
}
|
||||
|
||||
.upload-toast-file-fill.error {
|
||||
background: var(--color-notification-error);
|
||||
}
|
||||
|
||||
.upload-toast-file-pct {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-light);
|
||||
flex-shrink: 0;
|
||||
width: 38px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.upload-toast-footer {
|
||||
padding: 10px 16px;
|
||||
border-top: 1px solid var(--color-border-xfaint);
|
||||
}
|
||||
|
||||
.upload-toast-overall-bar {
|
||||
height: 4px;
|
||||
background: var(--color-bg-empty);
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.upload-toast-overall-fill {
|
||||
height: 100%;
|
||||
background: var(--color-accent);
|
||||
width: 0%;
|
||||
transition: width 0.25s ease;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.upload-toast-stats {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-faint2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user