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:
2026-11-22 15:01:42 +02:00
co-authored by Claude Opus 5.5
parent 1eb7e5e3a9
commit 673113aff7
11 changed files with 444 additions and 26 deletions
+10 -1
View File
@@ -1,7 +1,7 @@
// The signage editor's helpers (plan step 5.6a).
import { test } from 'node:test'
import assert from 'node:assert/strict'
import { fitsOrientation, mediaEntry, misfits, moved, slideBody, slideFromTemplate, TEMPLATES, totalSeconds, windowParts } from '../src/pages/signage/signageLogic.js'
import { fitsOrientation, moreChanged, mediaEntry, misfits, moved, slideBody, slideFromTemplate, TEMPLATES, totalSeconds, windowParts } from '../src/pages/signage/signageLogic.js'
test('templates fill their texts in the manager\'s language and copy their content', () => {
const tpl = TEMPLATES.find(x => x.key === 'happyHour')
@@ -119,3 +119,12 @@ test('owner review 6: a box off the slide (a strip stays), a tight box scaled ke
assert.equal(secondsMissing({ kind: 'blank', duration_s: 5, content: { widgets: [{ kind: 'stack', cells: [{ widgets: [{ kind: 'menu', board: { page_seconds: null } }] }] }] } }), true)
assert.equal(secondsMissing({ kind: 'menu', duration_s: 5, content: { page_seconds: 3 } }), false)
})
test("a widget's More settings: changed or as usual (6R.17)", () => {
assert.equal(moreChanged({ kind: 'clock' }), false)
assert.equal(moreChanged({ kind: 'clock', opacity: 100, shadow: 'none', animation: 'none', clock_separator: ':' }), false)
assert.equal(moreChanged({ kind: 'clock', clock_format: '12' }), true)
assert.equal(moreChanged({ kind: 'date', rotation: -15 }), true)
assert.equal(moreChanged({ kind: 'qr', media_id: 4 }), true)
assert.equal(moreChanged({ kind: 'logo', media_id: 4 }), false)
})