diff --git a/docs/DESIGN.md b/docs/DESIGN.md index b94d763..2466cbd 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -52,6 +52,7 @@ Every page is on `` except Inventory → Stock (a placeholder). Two-column | A colour (a venue's: data) | `ColourField` (`auto`, `opacity`, `presets`) | a field with its swatch and code; its panel (over the page) has 12 ready colours, the picker, the opacity (`#rrggbbaa`) and the code. `auto` = a first choice that leaves it to something else ("As the slide"). **Never** a bare `` | | An icon from a set | `IconPicker` (`icons` = { key: component }) | a field showing the icon; a grid of the set over the page, "No icon" first | | A whole number (seconds, counts) | `NumberInput` (`min`, `max`, `suffix`) | − / + on its sides, as tall as an input; it may be emptied while typing (`onChange(null)`): the form shows the error and blocks saving. **Never** clamp on every key (the user can't clear the field) | +| A note in a box (what works, a caution) | `Notice` (`tone`, `title`, `icon`, `items` = [{ tone, label, text }]) | a tinted box with a bar on its left; `items` are points with a tone dot and a bold label. **Never** a local `bg-info-soft` paragraph rebuilt per page | | A slider with its value | `Slider` (`suffix`) | framed and as tall as the fields beside it; the value sits as close to it as the frame's padding. **Never** a bare `` | | Fields that should wrap | `FieldRow` (`min`, `shade` on every other row) | each field keeps its least width; a row that wraps is framed (and tinted with `shade`), a row on one line looks like any row | | Toggles that go together (bold / italic / underline) | `Segmented multiple` | value is an array | diff --git a/manager_dashboard/src/pages/platform/DeviceSupport.jsx b/manager_dashboard/src/pages/platform/DeviceSupport.jsx new file mode 100644 index 0000000..dfb7388 --- /dev/null +++ b/manager_dashboard/src/pages/platform/DeviceSupport.jsx @@ -0,0 +1,18 @@ +// Which devices run the apps (2026-11-21): modern browsers run everything; older ones (a TV's built-in +// browser from 2021–2023) get the compatibility layer (terminal/vite.config.js, terminal/src/compat.js); +// older still, a blank page. Shown in the "Pair a device" dialog and on Signage → Screens. +import { useTranslation } from '@xenia/i18n' +import { Notice } from '@xenia/ui' +import { MonitorSmartphone } from 'lucide-react' + +export function DeviceSupport({ className }) { + const { t } = useTranslation('manager') + return ( + } title={t('devices.support.title')} className={className} data-testid="device-support" + items={[ + { tone: 'success', label: t('devices.support.bestLabel'), text: t('devices.support.best') }, + { tone: 'warning', label: t('devices.support.compatLabel'), text: t('devices.support.compat') }, + { tone: 'danger', label: t('devices.support.oldLabel'), text: t('devices.support.old') }, + ]} /> + ) +} diff --git a/manager_dashboard/src/pages/platform/DevicesPage.jsx b/manager_dashboard/src/pages/platform/DevicesPage.jsx index 8e236b0..a4c27a1 100644 --- a/manager_dashboard/src/pages/platform/DevicesPage.jsx +++ b/manager_dashboard/src/pages/platform/DevicesPage.jsx @@ -12,6 +12,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react' import { useSearchParams } from 'react-router-dom' import toast from 'react-hot-toast' import { MonitorSmartphone, Plus } from 'lucide-react' +import { DeviceSupport } from './DeviceSupport' import { errorMessage, parseError } from '@xenia/api' import { useTranslation, useFormat } from '@xenia/i18n' import { Button, Dialog, EmptyState, Field, Input, Page, Select, Spinner } from '@xenia/ui' @@ -244,6 +245,7 @@ function PairDialog({ apps, usage, devices, appName, limitLabel, initialApp, onC setCode(normalizeCode(e.target.value))} autoComplete="off" spellCheck={false} className="font-mono tracking-[0.3em] text-center uppercase" autoFocus /> +