Add the Glass Stage layout theme with overlay controls, 10 s skips, quick chips and stacked tiles

This commit is contained in:
Claude
2026-10-01 21:40:20 +00:00
parent 36fc5ff9e4
commit 19973c75c0
6 changed files with 309 additions and 14 deletions

View File

@@ -46,6 +46,16 @@ JSON shapes mirror the Tauri Rust bridge exactly — don't change one side alone
- `GET /api/p2p/available` + view `{type:'p2p'}` = the "📡 On other devices" list (sidebar, web only):
verified files with ≥1 sharing holder, online first, stale flagged. Rows play, export, or go to a playlist.
## Layout themes + Glass Stage
- Settings → Layout theme sets `html[data-layout]`; rules live in `styles.css` (older ones) and
`frontend/theme-glass.css` (**glass-stage**: frosted cards, coral glow). Glass Stage also changes layout:
overlay on the video (quality chip, Video / Audio-only, −10 / play / +10, shown when paused or after a tap),
deck row prev · −10 · play · +10 · next, volume pod + labelled mode pill, quick-setting chips (`#deckChips`,
refreshed every 1.5 s by the `glassStage` IIFE), four stacked icon tiles and secondary actions as a pill row,
floating mini player. Elements that only this theme shows (`.stg-overlay`, `.skip10`, `.deck-chips`, `.vol-pod`
extras, `.mode-name`) are in the shared markup and hidden by default.
- Now-playing tiles are `[svg.ti][span.tl]`; change state text with `setTile(btn, label)`, never `textContent`.
## Server media cache (`server/media-cache.js`)
- Every played (`/api/streams`, LOW priority, ≤ `MEDIA_AUTO_MAX_SECONDS`, default 3 h) or saved
(`/api/download`, HIGH, ≤ 3 h) video gets ONE copy: `$MEDIA_DIR/<id>.<gen>.mp4`