Wake lock persistence, button reposition, docs, dev LAN support
Wake lock (Prevent Sleep) toggles now persist across reloads via localStorage in both AdminView and DisplayView. Buttons repositioned inline in AdminView campaigns header bar (was floating overlay causing overlap on tablets). DisplayView buttons persist localStorage too. Wake lock acquire failure now shows toast with fix hint (HTTPS or Chrome flag). Fullscreenchange listener re-acquires wake lock (Android discards on screen off). dev-start.sh: auto-detects LAN IP (en0/en1), frontend binds 0.0.0.0, backend URL inlined as LAN IP so phones reach backend. DANGEROUSLY_DISABLE_HOST_CHECK for LAN access. Outputs LAN URL + wake lock flag instructions. Docs: README 'Prevent Sleep (Wake Lock)' section covering secure context requirement, Android Chrome flag workaround for LAN testing, iOS Safari standalone PWA bug. DEVELOPMENT.md LAN access + wake lock note.
This commit is contained in:
@@ -63,6 +63,14 @@ git config core.hooksPath .githooks # enable pre-push test gate
|
||||
|
||||
Idempotent: if port busy, leaves existing proc as-is.
|
||||
|
||||
**LAN access (phones):** frontend binds 0.0.0.0, LAN IP auto-detected.
|
||||
Other devices hit `http://<lan-ip>:3999`.
|
||||
|
||||
**Wake Lock (Prevent Sleep) on LAN IP:** requires secure context.
|
||||
Plain HTTP on LAN IP = wake lock silently fails. Android Chrome flag workaround:
|
||||
`chrome://flags/#unsafely-treat-insecure-origin-as-secure` → add
|
||||
`http://<lan-ip>:3999` (with port), enable, relaunch. See README for full details.
|
||||
|
||||
Smoke check:
|
||||
```bash
|
||||
curl http://127.0.0.1:4001/health # -> {"ok":true}
|
||||
|
||||
Reference in New Issue
Block a user