feat(manager): customer display looks: several, a default, one per display; pictures from the library (platform-v2 step 5.3)
Settings → Customer display lists the looks (default starred, how many displays each), edits one (logo / picture with MediaField, the slideshow's pictures picked several at a time, reordered, removed), new look (empty or a copy), make default, delete, and "Which display shows which look". The Devices page offers the looks for a display's Idle screen. MediaPicker: `multiple`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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' }
|
||||
const REF_URLS = { prep_zones: '/api/prep-zones', categories: '/api/products/categories', printers: '/api/system/printers', display_looks: '/api/display/looks' }
|
||||
|
||||
export default function DeviceConfigFields({ appKey, fields = [], value, onChange, devices = [], selfId = null }) {
|
||||
const { t } = useTranslation('manager')
|
||||
@@ -28,6 +28,7 @@ export default function DeviceConfigFields({ appKey, fields = [], value, onChang
|
||||
const zones = lists.prep_zones ?? []
|
||||
const categories = lists.categories ?? []
|
||||
const printers = lists.printers ?? []
|
||||
const looks = lists.display_looks ?? []
|
||||
|
||||
if (!fields.length) return null
|
||||
const base = key => `modules:${appKey}.config.${key}`
|
||||
@@ -53,7 +54,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, devices, selfId })]} />
|
||||
...refOptions(f, { zones, categories, printers, looks, devices, selfId })]} />
|
||||
</Field>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user