feat(signage): menus play whole rounds, seconds fields with − / +, widget limit setting, widgets as big as their content (owner review 6)

- A menu board with pages plays whole rounds (menuMs rounds its seconds up); the editor says how
  long it really plays under "Seconds on screen", the card and the playlist total use it.
- Seconds on screen / per page: shared NumberInput (− / +, may be emptied: an error under the
  field and Save blocked until filled; 1 s at least, server ge=1).
- Performance (Signage -> Message & settings): widgets per slide (signage.max_widgets, 10
  recommended, up to 50), checked by the server (signage.too_many_widgets) and the editor.
- Text, clock, date, QR, weather, logo placed by hand: the box is exactly the content (its height
  x text size sets the size, the width follows; handles scale keeping the shape; text size grows
  the box); a slide's widget may run off the slide while 5 % stays on it.
- Slider: the value as close to the slider as the frame's padding; floor and table-colour sliders
  use the shared Slider. Timeline cards' ring no longer clipped; larger playlist buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 15:11:48 +02:00
co-authored by Claude Opus 5.5
parent aa3fe85053
commit aa8ba5d1d4
33 changed files with 436 additions and 75 deletions
@@ -20,7 +20,7 @@ import { AlignCenter, AlignLeft, AlignRight, AlignVerticalJustifyCenter, AlignVe
import { MENU_LANGUAGES, SALES_POINTS } from '@xenia/access'
import { useFormat, useLanguage, useTranslation } from '@xenia/i18n'
import { badgeName } from '@xenia/signage'
import { Dropdown, Field, IconButton, Input, Segmented, Slider, Switch } from '@xenia/ui'
import { Dropdown, Field, IconButton, Input, NumberInput, Segmented, Slider, Switch } from '@xenia/ui'
import client from '../../api/client'
import { boardOrder, moveGroup, moveItem, toggled } from './signageLogic'
import { useBadges } from './useBadges'
@@ -227,8 +227,9 @@ export default function MenuEditor({ slide, onChange, media, onMedia, misfit = [
<Input inputMode="numeric" value={c.page_size ? String(c.page_size) : ''} placeholder={board ? '8' : t('signage.menu.auto')}
onChange={e => { const n = digits(e.target.value); setC({ page_size: n ? Math.min(60, Math.max(3, n)) : null }) }} data-testid="signage-menu-per-page" />
</Field>
<Field label={t('signage.menu.pageSeconds')} hint={t('signage.menu.pageSecondsHint')}>
<Input inputMode="numeric" value={String(c.page_seconds || 10)} onChange={e => setC({ page_seconds: Math.min(120, Math.max(3, digits(e.target.value) || 3)) })} />
<Field label={t('signage.menu.pageSeconds')} hint={c.page_seconds == null ? undefined : t('signage.menu.pageSecondsHint')}
error={c.page_seconds === null ? t('signage.secondsEmpty') : undefined}>
<NumberInput value={c.page_seconds === undefined ? 10 : c.page_seconds} min={1} max={120} suffix="s" onChange={v => setC({ page_seconds: v })} data-testid="signage-page-seconds" />
</Field>
</div>
</Section>