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:
@@ -98,14 +98,14 @@ def lines_for(db, screen_id: int) -> list:
|
||||
.order_by(SignageScheduleItem.position, SignageScheduleItem.id) if not i.screen_ids or screen_id in i.screen_ids]
|
||||
|
||||
|
||||
def now_for(db, dev, local: datetime | None = None, scenes=None) -> tuple[int | None, bool]:
|
||||
def now_for(db, dev, local: datetime | None = None, scenes=None) -> tuple[int | str | None, bool]:
|
||||
"""(the playlist a screen plays now, whether a schedule line picked it)."""
|
||||
from core.timeutil import venue_now
|
||||
from routers.signage import _screen_config
|
||||
from routers.signage import _screen_config, default_of
|
||||
from services.scenes import active_ids
|
||||
local = local or venue_now()
|
||||
scenes = active_ids(db) if scenes is None else scenes
|
||||
default = _screen_config(dev).get("playlist")
|
||||
default = default_of(_screen_config(dev)) # a playlist id, or "slide:<id>" (a library slide)
|
||||
got = pick([entry_of(i) for i in lines_for(db, dev.id)], None, local, scenes)
|
||||
return (got, True) if got is not None else (default, False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user