docs: Spec-Review-Korrekturen in Frontend-Overhaul-Design
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3bdddf69c6
commit
de268af814
1 changed files with 6 additions and 4 deletions
|
|
@ -119,9 +119,9 @@ The primary daily-use screen. Two-column desktop layout, stacked on mobile.
|
|||
- Delete asset: small trash icon on card hover
|
||||
|
||||
### Interactions (no page reloads)
|
||||
- Toggle enabled → `fetch POST /manage/{slug}/items/{id}/update`
|
||||
- Inline title/duration edit → `fetch POST` on blur
|
||||
- Reorder → `fetch POST /manage/{slug}/reorder`
|
||||
- Toggle enabled → `fetch POST /manage/{screenSlug}/items/{itemId}` (existing update endpoint)
|
||||
- Inline title/duration edit → `fetch POST /manage/{screenSlug}/items/{itemId}` on blur
|
||||
- Reorder → `fetch POST /manage/{screenSlug}/reorder`
|
||||
- Add to playlist → standard form POST (redirect back, which reloads — acceptable)
|
||||
- All other destructive actions retain redirect-based flow for safety
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ Live status dots used across all views (Tenant dashboard, Screen overview, Admin
|
|||
- Green: online (last heartbeat < 2 min)
|
||||
- Yellow: stale (< 10 min)
|
||||
- Red: offline (> 10 min or never seen)
|
||||
- Implementation: small `setInterval` (30s) fetches `/api/player-status/{slug}` per visible screen and updates dot color
|
||||
- Implementation: small `setInterval` (30s) fetches `/api/v1/screens/status` (bulk), matches results by `screen_id` field and updates dot color per screen
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -188,3 +188,5 @@ Live status dots used across all views (Tenant dashboard, Screen overview, Admin
|
|||
| `internal/httpapi/manage/ui.go` | Inline JS fetch handlers for playlist inline editing (no new Go handlers needed — existing endpoints are sufficient) |
|
||||
|
||||
No database changes. No new API endpoints needed for the visual overhaul (existing update/reorder endpoints cover the inline editing interactions).
|
||||
|
||||
**Important implementation note:** `HandleUpdateItemUI` currently calls `http.Redirect` on success. When called via `fetch` (inline editing), the redirect will be silently followed by the browser and the caller receives the full redirected page — not a clean response. `HandleUpdateItemUI` must be updated to return `204 No Content` when the request is a `fetch` call (detect via `X-Requested-With: fetch` header sent by the JS, or simply always return `204` since the manage page JS never needs the redirect). The existing redirect-based HTML form flow for other callers (add item, delete item) is unaffected.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue