mirror of
https://github.com/colonelpanichacks/flock-you.git
synced 2026-07-16 12:08:10 -07:00
dashboard: env-configurable port, plus ?demo=1 preview mode
flockyou.py: bind host and listen port both read from env (FLOCKYOU_HOST / FLOCKYOU_PORT, defaulting to 0.0.0.0:5000). Was a hardcoded :5000 before, which collides with other Flask projects on the same dev box — now you can run side-by-side instances or bind to localhost only. index.html: ?demo=1 query param seeds the dashboard with eight synthetic detections covering every visual state (live wildcard-probe, addr2, addr1 with/without GPS, replay/FLASH with/without GPS, replay/ RAM × 2) and reveals the device command toolbar so the polished layout is browseable without flashing real hardware. Purely a front-end mock — the command buttons still hit the real /api/flock/* endpoints, so clicking them in demo mode produces the actual "device not connected" error toast (that error path is itself part of the UI worth seeing). Self-contained: a single initDemoMode() function gated on the query param, called once at the end of DOMContentLoaded. api/README.md: both features documented under Quick start so they're discoverable without reading the source.
This commit is contained in:
@@ -21,6 +21,14 @@ python flockyou.py
|
||||
|
||||
Open `http://localhost:5000`.
|
||||
|
||||
Port and bind address are env-configurable:
|
||||
|
||||
```bash
|
||||
FLOCKYOU_PORT=5101 FLOCKYOU_HOST=127.0.0.1 python flockyou.py
|
||||
```
|
||||
|
||||
Append `?demo=1` to the dashboard URL (`http://localhost:5000/?demo=1`) to load a front-end-only mock with the device shown as connected and a handful of sample detections covering every visual state — live, replay/FLASH (purple), replay/RAM (cyan), with and without GPS — so the polished layout and the command toolbar are previewable without flashing real hardware. The command buttons still hit the real `/api/flock/*` endpoints in demo mode, so clicking them produces the actual "device not connected" error toast.
|
||||
|
||||
1. Plug your Flock-You device in over USB.
|
||||
2. Pick its port from the **Sniffer** dropdown and click **Connect**.
|
||||
3. Five command buttons appear next to the connect controls — that's the host command protocol.
|
||||
|
||||
Reference in New Issue
Block a user