feat(backend): signage widgets, the message of the day, the weather (platform-v2 step 5.4c)
- Widget on text and menu slides: logo (a picture), name, date (short/long), clock (seconds), message (the venue's or its own text), QR code (ordering / QR menu / a link; the screen gets the link), weather (1-3 days); position (corners, top / bottom bar) and size. Logos count as media usage. - The screen gets `venue`: name, message of the day, weather. - PUT /api/signage/message (one place, every screen told at once). - services/weather.py: the venue's place (town search through /api/signage/weather/places, PUT/DELETE /weather/place, °C/°F), Open-Meteo every 30 min (signage worker), kept in memory; no place, no internet or older than 3 h → weather null and the widget hides. signage.weather_offline when the town search can't reach the service. Checked against the real service. - tests: test_signage_widgets.py (5, a fake Open-Meteo); 520 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,7 @@ CODES: dict[str, tuple[int, str]] = {
|
||||
"signage.not_a_video": (422, "Pick a video for this slide."),
|
||||
"signage.content_invalid": (422, "This slide's setting isn't valid ({field}: {reason})."),
|
||||
"signage.order_mismatch": (409, "The playlist changed in the meantime. Reload it and try again."),
|
||||
"signage.weather_offline": (503, "The weather service can't be reached: the venue's server needs internet for it."),
|
||||
"media.builtin": (409, "Built-in pictures can't be deleted or renamed."),
|
||||
"reservation.not_found": (404, "Booking {reservation_id} not found."),
|
||||
"reservation.status_changed": (409, "This booking was changed on another screen in the meantime (it is now {current})."),
|
||||
|
||||
Reference in New Issue
Block a user