Server web UI: modern themeable layout with dark mode, timezone moved into config

Replaces the ad-hoc inline styling with a shared base template driven by
CSS custom properties (light/dark palettes), a card-based two-column
layout, and a persistent dark-mode toggle. Also moves quiet-hours'
timezone from the container's TZ env var into a proper web UI setting
(zoneinfo-backed), so it no longer needs a docker-compose.yml edit and
restart to change.
This commit is contained in:
2026-07-20 23:48:41 -04:00
parent fa47b88473
commit fdcb444d57
8 changed files with 540 additions and 202 deletions
+11 -6
View File
@@ -27,15 +27,20 @@ class FrameConfig(BaseModel):
order: str = "sequential" # or "shuffle"
refresh_interval_s: int = 3600
# Quiet hours: no point waking the device overnight just to swap a
# photo nobody's looking at. Times are "HH:MM" in the server's local
# timezone (see docker-compose.yml.example's TZ note) and may wrap
# past midnight (e.g. start=22:00, end=07:00). Purely a server-side
# decision -- the device is unaware, it just gets told a longer
# refresh_interval_s by GET /frame/config while quiet hours are in
# effect (see main.py's _effective_refresh_interval_s).
# photo nobody's looking at. Times are "HH:MM" interpreted in
# `timezone` below and may wrap past midnight (e.g. start=22:00,
# end=07:00). Purely a server-side decision -- the device is unaware,
# it just gets told a longer refresh_interval_s by GET /frame/config
# while quiet hours are in effect (see main.py's
# _effective_refresh_interval_s).
quiet_hours_enabled: bool = False
quiet_hours_start: str = "22:00"
quiet_hours_end: str = "07:00"
# IANA zone name (e.g. "America/New_York") quiet_hours_start/end are
# interpreted in. Set from the web UI rather than the container's TZ
# environment variable, so it survives container recreation and
# doesn't need a docker-compose.yml edit to change.
timezone: str = "UTC"
smart_crop_faces: bool = True
# How the physical frame is hung: landscape (native), portrait,
# landscape_flipped, portrait_flipped. Purely a server-side render