// Sign-in settings (plan step 2.6f, APPS_PLATFORM D-8, D-9). Backend-only until now: // auth.manager_login_mode, auth.waiter_login_mode, auth.waiter_require_username, // auth.default_login_mode (paired devices; a device can choose its own on the Devices page), // auth.single_session_manager / _waiter, and security.autofill_username (the sign-in page). // Replaces the v1 "login method" card, whose setting (security.login_method) no longer exists. import { useId } from 'react' import { useTranslation } from '@xenia/i18n' import { Select, Spinner, Switch } from '@xenia/ui' import { SettingRow, SettingsCard } from './SettingsCard' import { useSettings } from './useSettings' const SESSION_RULES = ['off', 'refuse_new', 'end_old'] export default function SignInSettings() { const { t } = useTranslation('manager') const s = useSettings() const idManager = useId() const idWaiter = useId() const idDevice = useId() const idSingleManager = useId() const idSingleWaiter = useId() if (s.loading) return
const opts = (keys, prefix) => keys.map(k => ({ value: k, label: t(`${prefix}.${k}`) })) const select = (key, fallback, options, id) => (