Files
Oxicloud/static/css/components/groupsModal.css
T
DioCrafts 81a93a489b 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>
2026-06-15 00:24:27 +02:00

309 lines
8.2 KiB
CSS

/* ── Groups management modal — content styles ─────────────────────────────────
*
* Hosted by Modal.openPanel(). Only this file's content scrolls; the overlay,
* container, header and footer come from modals.css.
*
* Two states share the same body: list (rows of groups + Create button) and
* detail (single-group editor). Switching is a body-level replaceChildren
* call; the modal frame stays open.
*
* BEM root: `.groups-modal`. All colours via design tokens.
* ───────────────────────────────────────────────────────────────────────── */
.groups-modal {
display: flex;
flex-direction: column;
gap: var(--space-3);
padding: var(--space-4) var(--space-5);
}
/* ── Common ─────────────────────────────────────────────────────────────── */
.groups-modal__status,
.groups-modal__empty-line {
color: var(--color-text-subtle);
font-size: var(--text-sm);
padding: var(--space-2) 0;
}
.groups-modal__error {
color: var(--color-danger-text);
background: var(--color-danger-bg);
border: 1px solid var(--color-danger-alt);
border-radius: var(--radius-md);
padding: var(--space-2-5) var(--space-3);
font-size: var(--text-sm);
}
.groups-modal__inline-error {
margin: 0 0 var(--space-2) 0;
color: var(--color-danger-text);
background: var(--color-danger-bg);
border: 1px solid var(--color-danger-alt);
border-radius: var(--radius-md);
padding: var(--space-2) var(--space-3);
font-size: var(--text-sm);
}
.groups-modal__section-title {
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
color: var(--color-text-subtle);
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: var(--space-2);
}
/* ── List view ──────────────────────────────────────────────────────────── */
.groups-modal__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
}
.groups-modal__subtitle {
font-size: var(--text-base);
color: var(--color-text-secondary);
}
.groups-modal__create-btn {
flex-shrink: 0;
}
.groups-modal__list {
display: flex;
flex-direction: column;
gap: var(--space-1);
max-height: 60vh;
overflow-y: auto;
}
.groups-modal__row {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-2-5) var(--space-3);
border-radius: var(--radius-lg);
cursor: pointer;
transition: background-color 0.12s ease;
}
.groups-modal__row:hover,
.groups-modal__row:focus-visible {
background: var(--color-bg-hover);
outline: none;
}
.groups-modal__row-main {
display: flex;
align-items: center;
gap: var(--space-3);
flex: 1;
min-width: 0;
}
.groups-modal__row-desc {
color: var(--color-text-subtle);
font-size: var(--text-xs);
margin-left: var(--space-2);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
flex: 1;
}
.groups-modal__row-badge {
background: var(--color-bg-muted);
color: var(--color-text-subtle);
font-size: var(--text-2xs);
font-weight: var(--weight-semibold);
padding: var(--space-0-5) var(--space-2);
border-radius: var(--radius-xl);
text-transform: uppercase;
letter-spacing: 0.03em;
flex-shrink: 0;
margin-left: var(--space-2);
}
.groups-modal__row-count {
color: var(--color-text-subtle);
font-size: var(--text-xs);
flex-shrink: 0;
margin-left: auto;
padding-left: var(--space-2);
white-space: nowrap;
}
.groups-modal__load-more {
align-self: center;
margin-top: var(--space-3);
}
.groups-modal__empty {
text-align: center;
color: var(--color-text-subtle);
padding: var(--space-8) var(--space-3);
}
.groups-modal__empty-icon {
font-size: var(--text-4xl);
color: var(--color-text-faint);
margin-bottom: var(--space-2);
display: block;
}
/* ── Detail view ────────────────────────────────────────────────────────── */
.groups-modal__detail-header {
display: flex;
align-items: center;
gap: var(--space-3);
padding-bottom: var(--space-3);
border-bottom: 1px solid var(--color-border);
}
.groups-modal__back-btn {
flex-shrink: 0;
}
.groups-modal__detail-title-wrap {
display: flex;
align-items: center;
gap: var(--space-2);
flex: 1;
min-width: 0;
}
.groups-modal__members {
display: flex;
flex-direction: column;
gap: var(--space-1);
max-height: 40vh;
overflow-y: auto;
}
.groups-modal__member-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-1-5) var(--space-2);
border-radius: var(--radius-md);
transition: background-color 0.12s ease;
}
.groups-modal__member-row:hover {
background: var(--color-bg-hover);
}
.groups-modal__member-remove {
flex-shrink: 0;
color: var(--color-text-subtle);
width: 28px;
height: 28px;
padding: 0;
border-radius: 50%;
}
.groups-modal__member-remove:hover {
color: var(--color-danger-text);
background: var(--color-danger-bg);
}
/* ── Add-member row ─────────────────────────────────────────────────────── */
.groups-modal__add-row {
position: relative;
margin-top: var(--space-2);
}
.groups-modal__add-input {
width: 100%;
padding: var(--space-2) var(--space-3);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
background: var(--color-bg-surface);
color: var(--color-text);
font-size: var(--text-sm);
}
.groups-modal__add-input:focus {
outline: 2px solid var(--color-accent-ring);
outline-offset: -1px;
border-color: var(--color-accent);
}
.groups-modal__add-dropdown {
position: absolute;
top: calc(100% + 4px);
left: 0;
right: 0;
background: var(--color-bg-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
box-shadow: 0 4px 12px var(--color-shadow);
max-height: 240px;
overflow-y: auto;
z-index: 10;
}
.groups-modal__add-dropdown.hidden {
display: none;
}
.groups-modal__add-item {
padding: var(--space-2) var(--space-3);
cursor: pointer;
transition: background-color 0.12s ease;
}
.groups-modal__add-item:hover,
.groups-modal__add-item:focus-visible {
background: var(--color-bg-hover);
outline: none;
}
/* ── Destructive footer ─────────────────────────────────────────────────── */
.groups-modal__footer {
display: flex;
justify-content: flex-start;
padding-top: var(--space-3);
border-top: 1px solid var(--color-border);
margin-top: var(--space-2);
}
/* ── Inline create / rename / confirm-delete forms ──────────────────────── */
/* Modal is a singleton; nesting Modal.prompt inside an open openPanel()
* can't surface its input. We render the form inside the panel body
* instead, swapping back to list / detail on submit or cancel. */
.groups-modal__form {
display: flex;
flex-direction: column;
gap: var(--space-3);
padding: var(--space-2) 0;
}
.groups-modal__form-label {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
font-size: var(--text-sm);
font-weight: var(--weight-medium);
color: var(--color-text-secondary);
}
.groups-modal__form-actions {
display: flex;
justify-content: flex-end;
gap: var(--space-2);
margin-top: var(--space-1);
}
.groups-modal__inline-error.hidden {
display: none;
}