feat(manager): built-in collection in the Media page and picker; signage screen settings in Devices (platform-v2 step 5.4a)

Media page and picker filter Everything / Your own / Built-in; built-in items
are marked and can't be renamed or deleted. The Devices page offers the
playlists for a signage screen (with its orientation and rotation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 18:35:13 +02:00
co-authored by Claude Opus 5.5
parent 7fc32ad917
commit a2d9e55222
9 changed files with 44 additions and 18 deletions
@@ -10,7 +10,7 @@ import client from '../../api/client'
import { configGroups, configValue, refOptions } from './devicesLogic'
// Where a `ref` field's choices come from (the device list is passed in)
const REF_URLS = { prep_zones: '/api/prep-zones', categories: '/api/products/categories', printers: '/api/system/printers', display_looks: '/api/display/looks' }
const REF_URLS = { prep_zones: '/api/prep-zones', categories: '/api/products/categories', printers: '/api/system/printers', display_looks: '/api/display/looks', signage_playlists: '/api/signage/playlists' }
export default function DeviceConfigFields({ appKey, fields = [], value, onChange, devices = [], selfId = null }) {
const { t } = useTranslation('manager')
@@ -29,6 +29,7 @@ export default function DeviceConfigFields({ appKey, fields = [], value, onChang
const categories = lists.categories ?? []
const printers = lists.printers ?? []
const looks = lists.display_looks ?? []
const playlists = lists.signage_playlists ?? []
if (!fields.length) return null
const base = key => `modules:${appKey}.config.${key}`
@@ -54,7 +55,7 @@ export default function DeviceConfigFields({ appKey, fields = [], value, onChang
<Field key={f.key} label={label} hint={hint}>
<Select value={v == null ? '' : String(v)} onChange={e => set(f, e.target.value)} data-config={f.key}
options={[{ value: '', label: t(`${base(f.key)}.none`, { defaultValue: t('devices.form.none') }) },
...refOptions(f, { zones, categories, printers, looks, devices, selfId })]} />
...refOptions(f, { zones, categories, printers, looks, playlists, devices, selfId })]} />
</Field>
)
}