feat(frontend): always-visible gun bays, idle/plugged/charging lamp language, self-service password

- Control renders every gun declared in the chargers registry, even when
  the charger is offline or has not reported that connector yet (state
  shows Offline / No status yet in gray)
- owner-specified state language: gray = idle, pulsing blue = cable in
  the socket (Preparing), green = charging; suspended/finishing = steady
  blue; fault = red
- POST /api/me/password (requires current password) + /account page,
  username in the topbar links to it
- smoke test: 58 checks (password change round-trip incl. old-password
  invalidation)
This commit is contained in:
2026-07-12 08:37:20 +02:00
parent 75869364b0
commit 3387f8689e
11 changed files with 229 additions and 48 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ backend/ (run: venv\Scripts\python -m backend.main, from the repo root)
- `ws://<host>:9000/<ChargerID>` — OCPP WebSocket (catch-all path, the JC-6620 dials in)
- `GET /` — **the [[frontend|React panel]]** served from `../frontend/dist/` with SPA fallback (deep links land on index.html; `/api/*` + `/docs` excluded; 503 with instructions if not built)
- `POST /api/login|logout`, `GET /api/me` — username/password → 30-day session (cookie + bearer)
- `POST /api/login|logout`, `GET /api/me`, `POST /api/me/password` (self-service change, current password required) — username/password → 30-day session (cookie + bearer)
- `GET /api/sessions?limit&cp&connector` — **charging history: who / when / kWh** (visibility: own sessions + guns within scope; admin sees all); `GET /api/sessions/{tx}/samples` — per-minute energy/power/SoC for charts
- `GET /api/status` — connected chargers, gun states, active transactions, auth events + pending-card count (admin), relays (filtered to what the caller may control)
- `GET /api/events?limit&event=` — tail the journal (admin)