Replace the web UI with a single-file page

The upstream jQuery page (147 KB, 3-column grid, slider values hidden,
help behind label clicks, no save feedback) is replaced by
firmware/uniclock/web/index.html: one file, no jQuery, gzipped by
web/gzip_web.py to data/index.html.gz (12 KB) before every build.

- Tabs Home / Tubes / Light / Network / System, rows with label, help
  line and control; sliders always show their value
- "Saved" / "Not saved" after each change, reverted on failure; offline
  indicator with automatic retry (the old poll stopped after one error)
- WiFi and MQTT settings only save with a Save button, then offer a
  restart; password fields are write-only
- Controls for hardware this clock lacks (alarm, radar, sensors) hidden
- Runs on sample data when opened from disk

Firmware: one serveStatic route (gzip, no-cache + ETag) replaces the
per-file routes; /getConfiguration no longer returns passwords and adds
ip, hasAlarm, hasRadar and the real cathProtMin; /getCurrentInfos adds
currentSec and mqtt state and sends "lux" instead of "lx" when there is
no sensor; /cathodeProtect and /firmwareupdate now answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-29 00:06:35 +01:00
1 parent ae87849e75
commit b40b5f680c
14 files changed
+724 -1661

No files matched your search

+10 -3
View File
@@ -105,6 +105,13 @@ GPIO0 to GND, tap RST to GND, then release GPIO0.
SignalRGB LED 0 = left tube, `tubePixels` {0,1,2,3} is right. Settings `wledEnable` /
`wledDarkWithTubes` / `wledUseBrightness` live in `prmExt`, stored in EEPROM after `prm` with
their own magic value: never add fields to `prm` (a `MAGIC_VALUE` bump factory-resets the
clock, WiFi included). HA switch "SignalRGB". `page.js`/`site.css` were cached by browsers for a
year; now sent with `no-cache`.
7. Open: the user can create `secrets.h` (gitignored, never read it) for OTA and web passwords.
clock, WiFi included). HA switch "SignalRGB".
7. Done (2026-10-28, not yet on the clock): new web UI. Source `firmware/uniclock/web/index.html`
(one file, no jQuery, controls generated from the `PAGES` table), gzipped by `web/gzip_web.py`
to `data/index.html.gz` (12 KB, was 147 KB), served by one `serveStatic` with `no-cache`.
Opened from disk it runs on sample data; check it with headless Edge (`msedge --headless=new
--screenshot`). `/getConfiguration` no longer returns passwords (`*PswSet` flags instead);
new fields `ip`, `hasAlarm`, `hasRadar`, real `cathProtMin`; `/getCurrentInfos` has
`currentSec` and `mqtt` (0 off / 1 not connected / 2 connected). Network settings save with a
Save button and offer a restart.
8. Open: the user can create `secrets.h` (gitignored, never read it) for OTA and web passwords.