feat(signage): Slides library, widgets placed on the preview, blank slides, slide editor rework

- Slides library (Alembic 0044, /api/signage/library): slides kept with a name and a
  description, added to playlists as copies ("Add a slide" → Your slides, "Keep in Slides"),
  or shown alone as a screen's default (device config `slide`, played as "slide:<id>",
  also as a schedule's fallback). Signage → Slides: gallery + a two-pane editor.
- Widgets moved and sized by hand on the preview (WidgetCanvas: handles, snapping, arrow
  keys): position/size "custom" with a box the TV draws the same; alignment per widget.
- Blank slides (background + widgets); menu boards narrower and placed left/centre/right.
- Slide editor reworked: name | show, transition effect | seconds; sections; text look on
  one row with ready colours; one card per widget, settings on one row.
- Questions inside the page (@xenia/ui ConfirmDialog/useConfirm), Switch boxed, Segmented
  fill; the timeline's drop line; schedule lines run on weekdays or smart days, not both;
  the playlist editor stays within 1080p with a long timeline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 07:53:27 +02:00
co-authored by Claude Opus 5.5
parent 60e6a16217
commit 83551714f7
46 changed files with 1934 additions and 431 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ import models.fees # noqa: F401 DeliveryArea, FeeRule (phase 3S, S.3)
import models.refund # noqa: F401 Refund, RefundItem (step 3.3e)
import models.media # noqa: F401 Media (media library, step 5.1)
import models.display_look # noqa: F401 DisplayLook (customer display looks, step 5.3)
import models.signage # noqa: F401 SignagePlaylist, SignageSlide (signage, step 5.4a)
import models.signage # noqa: F401 SignagePlaylist, SignageSlide, SignageSavedSlide (signage, 5.4a; library 2026-11-21)
import models.scene # noqa: F401 Scene (2026-11-21)
import models.tablet_order # noqa: F401 TabletOrder (ordering from a menu tablet, step 6.6)
import models.floor_plan # noqa: F401 FloorPlan, FloorItem (the table map, step 6.8)
+26
View File
@@ -78,3 +78,29 @@ class SignageScheduleItem(Base):
position = Column(Integer, nullable=False, default=0)
created_at = Column(UTCDateTime, default=utcnow, nullable=False)
updated_at = Column(UTCDateTime, default=utcnow, onupdate=utcnow, nullable=False)
class SignageSavedSlide(Base):
"""A slide kept in the Slides library (owner 2026-11-21): built once, with a name and a short
description, then added to playlists (a copy goes in) or shown alone on a screen that has it
as its default (device config `slide`). The same fields as a playlist's slide, plus the shape
it is built for (its preview and the picture-fit warnings)."""
__tablename__ = "signage_saved_slides"
id = Column(Integer, primary_key=True, index=True)
name = Column(String, nullable=False)
description = Column(String, nullable=True)
orientation = Column(String, nullable=False, default="landscape") # landscape | portrait
kind = Column(String, nullable=False) # menu | image | video | text | blank
duration_s = Column(Integer, nullable=False, default=10)
transition = Column(String, nullable=True)
video_to_end = Column(Boolean, nullable=False, default=False)
enabled = Column(Boolean, nullable=False, default=True)
days = Column(JSON, nullable=True)
time_from = Column(String, nullable=True)
time_to = Column(String, nullable=True)
date_from = Column(String, nullable=True)
date_to = Column(String, nullable=True)
content = Column(JSON, nullable=False, default=dict)
created_at = Column(UTCDateTime, default=utcnow, nullable=False)
updated_at = Column(UTCDateTime, default=utcnow, onupdate=utcnow, nullable=False)