import { NightBackdrop } from './Welcome' import { IconBack } from '../components/Icons' import { defaultFovFor } from '../lib/camera' import { APP_NAME } from '../lib/app' import { num } from '../lib/format' import { t, LOCALES, systemLocale, localeName } from '../i18n' // Typical phone portrait frame (9:16) when nothing is calibrated yet. const PORTRAIT_GUESS = defaultFovFor(9, 16) export default function Settings({ settings, onSettingsChange, onBack, onCalibrate }) { const fov = settings.fovDeg const adjust = (d) => { const base = fov != null ? fov : PORTRAIT_GUESS onSettingsChange({ fovDeg: Math.round(Math.min(120, Math.max(20, base + d)) * 10) / 10 }) } return (
{onBack && }

{t('settings.title')}

{t('settings.camera')}
{t('settings.fov')} {fov != null ? t('settings.fovValue', { fov: num(fov, 1) }) : t('settings.fovAssumed', { fov: num(PORTRAIT_GUESS, 0) })}
{fov != null && ( )}
{t('settings.fovHint')}
onSettingsChange({ author: e.target.value })} autoComplete="name" dir="auto" />
{t('settings.about', { app: APP_NAME })}
) }