// A paired screen that can't run its app (plan step 3.1c): the app is turned off or not in // the license (me.app_status), or the server refuses the device itself (e.g. more screens // than the license allows). It changes by itself: module on/off sends device.updated live, // and GET /me is retried every few seconds while refused. import { PowerOff } from 'lucide-react' import { errorMessage } from '@xenia/api' import { useTranslation } from '@xenia/i18n' import { EmptyState } from '@xenia/ui' import { useDevice } from '../device/context' export default function BlockedScreen() { const { t } = useTranslation('terminal') const { me, meError } = useDevice() let title, body if (me) { const app = t(`modules:${me.app_key}.name`) title = me.app_status === 'module.not_licensed' ? t('blocked.notLicensed', { app }) : t('blocked.off', { app }) body = me.app_status === 'module.not_licensed' ? t('blocked.notLicensedBody') : t('blocked.offBody') } else { title = t('blocked.refused') body = errorMessage({ xenia: meError }, t) } return (
} title={title} description={body} />
) }