feat(signage): More settings for every widget (opacity, rotation, shadow, border, entrance animation, a logo's fit; text weight, highlight, typing out; date and clock formats; a logo in a QR code)
Folded under each widget card like Text and colours. The TV puts them on the element that places the widget (fx), animations on translate / scale so its place's transform stays (an older TV only fades); an entrance animates to the widget's own opacity. Calibrating: a strict-mode remount no longer ends it. Plan 6R.17, F-115. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -256,7 +256,7 @@ class Widget(_Strict):
|
||||
size: Literal["small", "medium", "large", "custom"] = "medium"
|
||||
box: Optional[Box] = None # position "custom"
|
||||
align: Literal["auto", "left", "center", "right"] = "auto" # inside its place; auto: by its corner / box
|
||||
media_id: Optional[int] = None # logo: a picture
|
||||
media_id: Optional[int] = None # logo: a picture; QR: a logo in its middle (6R.17)
|
||||
text: Optional[str] = Field(default=None, max_length=500) # message: this text instead of the venue's; text, ticker, a countdown's / hours' title
|
||||
date_style: Literal["short", "long"] = "long"
|
||||
clock_seconds: bool = False
|
||||
@@ -323,6 +323,27 @@ class Widget(_Strict):
|
||||
gallery_seconds: int = Field(default=5, ge=3, le=120)
|
||||
gallery_transition: Literal["fade", "slide", "zoom", "none"] = "fade"
|
||||
gallery_fit: Literal["cover", "contain"] = "cover"
|
||||
# more settings (6R.17), every widget: on the element that places it
|
||||
opacity: int = Field(default=100, ge=10, le=100)
|
||||
rotation: int = Field(default=0, ge=-180, le=180)
|
||||
shadow: Literal["none", "soft", "strong", "glow"] = "none"
|
||||
shadow_colour: Optional[str] = Field(default=None, pattern=HEX)
|
||||
border_width: int = Field(default=0, ge=0, le=20) # tenths of a usual unit
|
||||
border_colour: Optional[str] = Field(default=None, pattern=HEX)
|
||||
border_radius: int = Field(default=0, ge=0, le=100) # tenths of a usual unit
|
||||
animation: Literal["none", "fade", "rise", "drop", "slide-left", "slide-right", "zoom", "pop", "pulse", "float"] = "none"
|
||||
animation_delay: int = Field(default=0, ge=0, le=50) # tenths of a second
|
||||
fit: Literal["contain", "cover", "fill"] = "contain" # a logo / picture in its box
|
||||
# texts
|
||||
weight: Optional[int] = Field(default=None, ge=100, le=900) # None: as the widget usually is (bold switch)
|
||||
highlight: Optional[str] = Field(default=None, pattern=HEX) # a marker behind the text
|
||||
text_effect: Literal["none", "typewriter"] = "none"
|
||||
# dates and clocks
|
||||
date_format: Optional[Literal["long", "short", "weekday", "day_month", "weekday_day_month", "numeric", "numeric_short", "iso"]] = None
|
||||
date_separator: Optional[Literal["/", ".", "-", " "]] = None
|
||||
clock_format: Literal["24", "12"] = "24"
|
||||
clock_separator: Literal[":", "."] = ":"
|
||||
clock_blink: bool = False
|
||||
|
||||
@model_validator(mode="after")
|
||||
def _place(self):
|
||||
|
||||
Reference in New Issue
Block a user