feat(terminal): older TVs get a legacy build with a compatibility layer; modern output unchanged
- @vitejs/plugin-legacy: browsers without import.meta.resolve (older than Chrome 105 / Firefox 106 / Safari 16.4) load a second copy built for Chrome 79 / Firefox 78 / Safari 13 with polyfills. The modern targets and the stylesheet stay on Vite's own defaults, so modern chunks are byte-identical to before (only plugin-legacy's 230-byte guard in the entry). - terminal/src/compat.js (legacy copy only): swaps in <name>.compat.css (lightningcss for the older targets), sets container-size variables for signage slides, emulates flex gap. - @xenia/signage cq()/CQ_BOX: container units as before where supported, calc(var()) fallback otherwise; EmbeddedSlide no longer uses inline `inset`. - Shared Notice (@xenia/ui); "Devices that work" in Pair a device and Signage -> Screens (EN/EL). - tests/e2e/compat.mjs: modern browser loads nothing extra; a simulated older TV runs the legacy copy and the layer, pairs, and plays a slide at the same sizes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import { AlertTriangle, CalendarClock, Monitor, Smartphone } from 'lucide-react'
|
||||
import { errorMessage } from '@xenia/api'
|
||||
import { useTranslation } from '@xenia/i18n'
|
||||
import { Dropdown, EmptyState, Field, Spinner } from '@xenia/ui'
|
||||
import { DeviceSupport } from '../platform/DeviceSupport'
|
||||
import * as api from './signageApi'
|
||||
|
||||
export default function ScreensTab() {
|
||||
@@ -30,12 +31,18 @@ export default function ScreensTab() {
|
||||
}
|
||||
if (!screens) return <div className="flex justify-center p-6"><Spinner /></div>
|
||||
if (!screens.length) {
|
||||
return <EmptyState title={t('signage.screens.none')} description={t('signage.screens.noneHint')}
|
||||
action={<Link to="/devices?pair=signage" className="text-accent-ink font-medium">{t('signage.screens.pair')}</Link>} />
|
||||
return (
|
||||
<div className="grid gap-4">
|
||||
<EmptyState title={t('signage.screens.none')} description={t('signage.screens.noneHint')}
|
||||
action={<Link to="/devices?pair=signage" className="text-accent-ink font-medium">{t('signage.screens.pair')}</Link>} />
|
||||
<DeviceSupport className="max-w-3xl" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div className="grid gap-3">
|
||||
<p className="text-label text-ink-2 max-w-3xl">{t('signage.screens.intro')}</p>
|
||||
<DeviceSupport className="max-w-3xl" />
|
||||
<ul className="grid gap-3 xl:grid-cols-2" data-testid="signage-screens">
|
||||
{screens.map(s => {
|
||||
const Icon = s.orientation === 'portrait' ? Smartphone : Monitor
|
||||
|
||||
Reference in New Issue
Block a user