mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 07:07:31 +00:00
feat(mobile): admin and settings sections ordered and trimmed like the desktop
- The phone's admin sections follow the desktop sidebar: the same groups (Users, Configuration, Maintenance) in its dropdown, Security and Services instead of one Settings section, and live flights and booking mails beside the addons they configure. An old ?tab=settings link still opens Security. - Passkey login and the 2FA rule sit with the other ways in; the passkey card keeps the domain, and a managed install no longer shows the danger zone. - MAdminSelect replaces every native select on the admin screens: TREK's own field or row pill that opens the picker sheet (permissions, backup schedule, invite trip, plugin settings). - Explanations wait behind an info mark (MHintLabel), as on the desktop: admin rows and fields, the settings rows' new `hint`, addon and provider rows. - Permissions are one line each with the level as a pill; addon rows lose the type badge their heading already names; settings buttons no longer wrap. - "Require 2FA" in every language; admin.tabs.settings is unused and gone.
This commit is contained in:
@@ -375,7 +375,7 @@ const SCRIPTS: Record<string, GuideScript> = {
|
||||
only(p => section(p, 'Authentication Methods').getByText('Password Login', { exact: true }).locator('xpath=../..')),
|
||||
// The SSO rows exist only once OIDC is configured; the run shows where that happens.
|
||||
only(p => section(p, 'Single Sign-On (OIDC)')),
|
||||
only(p => section(p, 'Require two-factor authentication (2FA)')),
|
||||
only(p => section(p, 'Require 2FA')),
|
||||
],
|
||||
},
|
||||
'admin-passkeys': {
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import { Info } from 'lucide-react';
|
||||
import { useState, type ReactNode } from 'react';
|
||||
|
||||
interface MHintLabelProps {
|
||||
label: ReactNode;
|
||||
/** The explanation. It waits behind the mark until tapped; a screen reader reads it after the label all the same. */
|
||||
hint?: ReactNode;
|
||||
labelClassName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A setting's label with its explanation behind a small mark, the phone's form
|
||||
* of the desktop HintMark: the row stays one line, a tap on the mark opens the
|
||||
* sentence under the label and a second tap folds it again.
|
||||
*/
|
||||
export default function MHintLabel({
|
||||
label,
|
||||
hint,
|
||||
labelClassName = 'text-[length:calc(13px*var(--fs-scale-body,1))] font-bold text-m-ink',
|
||||
}: MHintLabelProps) {
|
||||
const [open, setOpen] = useState(false);
|
||||
return (
|
||||
<div className="min-w-0">
|
||||
{/* The mark rides at the end of the label's last line, also when a long label wraps. */}
|
||||
<div className={labelClassName}>
|
||||
{label}
|
||||
{hint && (
|
||||
// Touch only: the sentence below is in the page for a screen reader already.
|
||||
<button
|
||||
type="button"
|
||||
aria-hidden
|
||||
tabIndex={-1}
|
||||
data-testid="m-hint-mark"
|
||||
onClick={() => setOpen((value) => !value)}
|
||||
className={`-my-[6px] ms-[2px] inline-flex h-[24px] w-[24px] items-center justify-center rounded-full align-middle ${
|
||||
open ? 'text-m-ink' : 'text-m-faint'
|
||||
}`}
|
||||
>
|
||||
<Info size={13} strokeWidth={2.1} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{hint && (
|
||||
<div
|
||||
className={
|
||||
open
|
||||
? 'mt-[3px] font-geist text-[length:calc(10px*var(--fs-scale-caption,1))] leading-relaxed text-m-muted'
|
||||
: 'sr-only'
|
||||
}
|
||||
>
|
||||
{hint}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -9,16 +9,17 @@ import {
|
||||
Bug,
|
||||
ChevronDown,
|
||||
ChevronLeft,
|
||||
Compass,
|
||||
Database,
|
||||
FileText,
|
||||
Github,
|
||||
GitBranch,
|
||||
HardDrive,
|
||||
KeyRound,
|
||||
Map,
|
||||
Plug,
|
||||
Puzzle,
|
||||
ScrollText,
|
||||
Settings as SettingsIcon,
|
||||
Shield,
|
||||
ShieldCheck,
|
||||
SlidersHorizontal,
|
||||
UserCog,
|
||||
UserPlus,
|
||||
@@ -46,7 +47,7 @@ import MAdminUsersSection from './MAdminUsersSection'
|
||||
import { MAdminButton } from './MAdminUi'
|
||||
import { managedAdminTabs } from '../../../managed'
|
||||
import { useIsSplit } from '../../../hooks/sizeClass'
|
||||
import MSectionNav, { MSectionRow, SECTION_SCREEN, type MSection } from '../../components/MSectionNav'
|
||||
import MSectionNav, { MSectionList, SECTION_SCREEN, type MSection } from '../../components/MSectionNav'
|
||||
|
||||
// Stat card of the 2×2 grid (design §6.3): 34px icon tile, 19px/800 number,
|
||||
// small tracking label. Count-up animation matches the desktop stat cards.
|
||||
@@ -66,16 +67,16 @@ function MAdminStat({ label, value, icon: Icon }: { label: string; value: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Mobile admin screen (design §6): section switcher pill with the 11-entry
|
||||
* dropdown, update banner, stats grid and the users section; every other
|
||||
* desktop admin section stays reachable through the dropdown.
|
||||
* Mobile admin screen (design §6): section switcher pill with the grouped
|
||||
* dropdown of the desktop sidebar's sections, update banner, stats grid and
|
||||
* the active section.
|
||||
*/
|
||||
export default function MAdmin() {
|
||||
const { t, locale } = useTranslation()
|
||||
const admin = useAdmin()
|
||||
const {
|
||||
demoMode, mcpEnabled, devMode, managed, navigate,
|
||||
activeTab: deskTab, setActiveTab, stats, serverTimezone,
|
||||
activeTab, setActiveTab, stats, serverTimezone,
|
||||
bagTrackingEnabled, collabFeatures,
|
||||
setShowCreateUser,
|
||||
updateInfo, setShowUpdateModal,
|
||||
@@ -86,30 +87,32 @@ export default function MAdmin() {
|
||||
// settings, instead of behind the header's dropdown.
|
||||
const split = useIsSplit()
|
||||
|
||||
// Same sections and gating as the desktop sidebar, ordered and iconed like
|
||||
// the design's dropdown (§6.1).
|
||||
// The desktop sidebar's sections, groups, order, icons and gating, so a link
|
||||
// to a tab and a habit from the laptop land on the same place here.
|
||||
const gUsers = t('admin.group.users')
|
||||
const gConfig = t('admin.group.config')
|
||||
const gMaintenance = t('admin.group.maintenance')
|
||||
const groupOf = { users: gUsers, config: gConfig, integration: gConfig, maintenance: gMaintenance }
|
||||
const sections: MSection[] = [
|
||||
{ id: 'users', label: t('admin.tabs.users'), icon: Users },
|
||||
{ id: 'defaults', label: t('admin.tabs.defaults'), icon: UserCog },
|
||||
{ id: 'config', label: t('admin.tabs.config'), icon: SlidersHorizontal },
|
||||
{ id: 'settings', label: t('admin.tabs.settings'), icon: SettingsIcon },
|
||||
{ id: 'addons', label: t('admin.tabs.addons'), icon: Blocks },
|
||||
...(managed ? [] : [{ id: 'plugins', label: t('admin.tabs.plugins'), icon: Puzzle }]),
|
||||
...(managed ? [] : [{ id: 'storage', label: t('admin.tabs.storage'), icon: HardDrive }]),
|
||||
{ id: 'notifications', label: t('admin.tabs.notifications'), icon: Bell },
|
||||
...(mcpEnabled ? [{ id: 'mcp-tokens', label: t('admin.tabs.mcpTokens'), icon: Plug }] : []),
|
||||
// Same two the desktop list drops: releases and backup schedule belong to
|
||||
// whoever operates the install.
|
||||
...(managed ? [] : [{ id: 'github', label: t('admin.tabs.github'), icon: Github }]),
|
||||
...(managed ? [] : [{ id: 'backup', label: t('admin.tabs.backup'), icon: Database }]),
|
||||
{ id: 'audit', label: t('admin.tabs.audit'), icon: ScrollText },
|
||||
...(devMode ? [{ id: 'dev-notifications', label: 'Dev: Notifications', icon: Bug }] : []),
|
||||
{ id: 'users', label: t('admin.tabs.users'), icon: Users, group: gUsers },
|
||||
{ id: 'defaults', label: t('admin.tabs.defaults'), icon: UserCog, group: gUsers },
|
||||
{ id: 'security', label: t('admin.tabs.security'), icon: ShieldCheck, group: gConfig },
|
||||
{ id: 'services', label: t('admin.tabs.services'), icon: Compass, group: gConfig },
|
||||
{ id: 'addons', label: t('admin.tabs.addons'), icon: Puzzle, group: gConfig },
|
||||
{ id: 'config', label: t('admin.tabs.config'), icon: SlidersHorizontal, group: gConfig },
|
||||
{ id: 'notifications', label: t('admin.tabs.notifications'), icon: Bell, group: gConfig },
|
||||
...(mcpEnabled ? [{ id: 'mcp-tokens', label: t('admin.tabs.mcpTokens'), icon: KeyRound, group: gConfig }] : []),
|
||||
// A hosted instance offers no plugins, storage backends, backup schedule or
|
||||
// releases: they belong to whoever operates the install.
|
||||
...(managed ? [] : [{ id: 'plugins', label: t('admin.tabs.plugins'), icon: Blocks, group: gConfig }]),
|
||||
...(managed ? [] : [{ id: 'storage', label: t('admin.tabs.storage'), icon: HardDrive, group: gMaintenance }]),
|
||||
...(managed ? [] : [{ id: 'backup', label: t('admin.tabs.backup'), icon: Database, group: gMaintenance }]),
|
||||
...(managed ? [] : [{ id: 'github', label: t('admin.tabs.github'), icon: GitBranch, group: gMaintenance }]),
|
||||
{ id: 'audit', label: t('admin.tabs.audit'), icon: ScrollText, group: gMaintenance },
|
||||
...(devMode ? [{ id: 'dev-notifications', label: 'Dev: Notifications', icon: Bug, group: gMaintenance }] : []),
|
||||
// The install's own tabs (managed/index.tsx), after the built-in ones as on the desktop.
|
||||
...managedAdminTabs.map(tab => ({ id: tab.id, label: tab.label, icon: tab.Icon })),
|
||||
...managedAdminTabs.map(tab => ({ id: tab.id, label: tab.label, icon: tab.Icon, group: groupOf[tab.group ?? 'config'] })),
|
||||
]
|
||||
// The desktop splits the settings into Security and Services; the phone keeps
|
||||
// them in its one Settings section, so either desktop tab (and a link to it) opens that.
|
||||
const activeTab = deskTab === 'security' || deskTab === 'services' ? 'settings' : deskTab
|
||||
const activeSection = sections.find((s) => s.id === activeTab) ?? sections[0]
|
||||
|
||||
return (
|
||||
@@ -173,17 +176,14 @@ export default function MAdmin() {
|
||||
{/* Section dropdown */}
|
||||
{sectionsOpen && !split && (
|
||||
<div className="-mt-[6px] mb-3 rounded-2xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-sheetop)] p-[6px] shadow-[0_16px_40px_-20px_rgba(0,0,0,.4)]">
|
||||
{sections.map((section) => (
|
||||
<MSectionRow
|
||||
key={section.id}
|
||||
section={section}
|
||||
active={section.id === activeSection.id}
|
||||
onPick={() => {
|
||||
setActiveTab(section.id)
|
||||
setSectionsOpen(false)
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
<MSectionList
|
||||
sections={sections}
|
||||
activeId={activeSection.id}
|
||||
onPick={(id) => {
|
||||
setActiveTab(id)
|
||||
setSectionsOpen(false)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -228,7 +228,8 @@ export default function MAdmin() {
|
||||
|
||||
{/* Active section */}
|
||||
{activeTab === 'users' && <MAdminUsersSection admin={admin} t={t} locale={locale} />}
|
||||
{activeTab === 'settings' && <MAdminSettingsSection admin={admin} t={t} />}
|
||||
{activeTab === 'security' && <MAdminSettingsSection admin={admin} t={t} part="security" />}
|
||||
{activeTab === 'services' && <MAdminSettingsSection admin={admin} t={t} part="services" />}
|
||||
{activeTab === 'notifications' && <MAdminNotificationsSection admin={admin} t={t} />}
|
||||
{activeTab === 'defaults' && <MAdminDefaultUserSettings />}
|
||||
{activeTab === 'config' && (
|
||||
@@ -246,6 +247,8 @@ export default function MAdmin() {
|
||||
collabFeatures={collabFeatures}
|
||||
onToggleCollabFeature={toggleCollabFeature}
|
||||
/>
|
||||
{/* How the integrations reach the world (live flights, booking mails), beside the addons they serve. */}
|
||||
<MAdminSettingsSection admin={admin} t={t} part="features" />
|
||||
<MAdminPaddleRegionsPanel />
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -21,7 +21,8 @@ import AiSettingsDialog from '../../../components/Admin/addons/AiAdminConfig'
|
||||
import { AI_ADDON_ICONS, type AiAddonId } from '../../../components/Admin/addons/aiAddons'
|
||||
import { useAiAddonTile } from '../../../components/Admin/addons/useAiAddonTile'
|
||||
import { ImmichIcon, SynologyIcon } from '../../../components/Admin/addons/PhotoProviderIcons'
|
||||
import { MAdminCard, MAdminClampedText } from './MAdminUi'
|
||||
import { MAdminCard } from './MAdminUi'
|
||||
import MHintLabel from '../../components/MHintLabel'
|
||||
import WandererMark from '../../../components/Tours/wanderer/WandererMark'
|
||||
import MSkeleton from '../../components/MSkeleton'
|
||||
|
||||
@@ -189,11 +190,14 @@ export default function MAdminAddonManager({ bagTrackingEnabled, onToggleBagTrac
|
||||
function MGroupHead({ icon: Icon, label, hint }: { icon: typeof Briefcase; label: string; hint: string }) {
|
||||
return (
|
||||
<div className="mb-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<Icon size={13} className="flex-none text-m-muted" />
|
||||
<span className="font-geist text-[length:calc(10px*var(--fs-scale-caption,1))] font-bold uppercase tracking-[0.06em] text-m-muted">{label}</span>
|
||||
<div className="flex items-start gap-2">
|
||||
<Icon size={13} className="mt-[2px] flex-none text-m-muted" />
|
||||
<MHintLabel
|
||||
label={label}
|
||||
hint={hint}
|
||||
labelClassName="font-geist text-[length:calc(10px*var(--fs-scale-caption,1))] font-bold uppercase tracking-[0.06em] text-m-muted"
|
||||
/>
|
||||
</div>
|
||||
<p className="mt-[2px] ps-[21px] font-geist text-[length:calc(9.5px*var(--fs-scale-caption,1))] leading-snug text-m-faint">{hint}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -205,11 +209,12 @@ interface MAddonRowProps {
|
||||
first?: boolean
|
||||
}
|
||||
|
||||
/** Addon row: icon tile, name + type badge, description, MToggle. */
|
||||
/**
|
||||
* Addon row: icon tile, name with its description behind the info mark, MToggle.
|
||||
* No type badge: every row stands under its type's heading already.
|
||||
*/
|
||||
function MAddonRow({ addon, onToggle, t, first }: MAddonRowProps) {
|
||||
const label = getAddonLabel(t, addon)
|
||||
const typeLabel =
|
||||
addon.type === 'global' ? t('admin.addons.type.global') : addon.type === 'integration' ? t('admin.addons.type.integration') : t('admin.addons.type.trip')
|
||||
return (
|
||||
<div className={`flex items-center gap-3 py-[11px] ${first ? '' : 'border-t border-[color:var(--m-rowbr)]'}`}>
|
||||
{/* overflow-hidden so a brand mark that fills the slot keeps its rounded corners. */}
|
||||
@@ -217,13 +222,7 @@ function MAddonRow({ addon, onToggle, t, first }: MAddonRowProps) {
|
||||
<AddonIcon name={addon.icon} size={18} enabled={addon.enabled} />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="min-w-0 truncate text-[0.8125rem] font-bold text-m-ink">{label.name}</span>
|
||||
<span className="flex-none rounded-full bg-[color:var(--m-ic)] px-[7px] py-[2px] font-geist text-[0.5625rem] font-bold text-m-muted">
|
||||
{typeLabel}
|
||||
</span>
|
||||
</div>
|
||||
<MAdminClampedText className="mt-[1px] text-[length:calc(10px*var(--fs-scale-caption,1))]">{label.description}</MAdminClampedText>
|
||||
<MHintLabel label={label.name} hint={label.description} />
|
||||
</div>
|
||||
<MToggle checked={addon.enabled} ariaLabel={label.name} onChange={() => onToggle(addon)} />
|
||||
</div>
|
||||
@@ -265,8 +264,7 @@ function MSubRow({ icon: Icon, providerIcon: ProviderIcon, title, subtitle, enab
|
||||
{Icon ? <Icon size={14} /> : ProviderIcon ? <ProviderIcon size={14} /> : null}
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-[0.75rem] font-bold text-m-ink">{title}</div>
|
||||
<MAdminClampedText className="mt-[1px] text-[length:calc(9.5px*var(--fs-scale-caption,1))]">{subtitle}</MAdminClampedText>
|
||||
<MHintLabel label={title} hint={subtitle} labelClassName="text-[length:calc(12px*var(--fs-scale-body,1))] font-bold text-m-ink" />
|
||||
</div>
|
||||
<MToggle checked={enabled} ariaLabel={title} onChange={onToggle} />
|
||||
</div>
|
||||
@@ -284,8 +282,7 @@ function MAiAddons({ addons, onToggle }: { addons: Addon[]; onToggle: (addon: Ad
|
||||
<Sparkles size={18} />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<span className="block truncate text-[0.8125rem] font-bold text-m-ink">{t('admin.addons.ai.name')}</span>
|
||||
<p className="mt-[1px] font-geist text-[0.625rem] leading-relaxed text-m-muted">{t('admin.addons.ai.description')}</p>
|
||||
<MHintLabel label={t('admin.addons.ai.name')} hint={t('admin.addons.ai.description')} />
|
||||
</div>
|
||||
<span className="flex-none rounded-full bg-[color:var(--m-ic)] px-[7px] py-[2px] font-geist text-[0.5625rem] font-bold text-m-muted">
|
||||
{tile.enabledCount}/{addons.length}
|
||||
|
||||
@@ -21,10 +21,7 @@ import { useTranslation } from '../../../i18n'
|
||||
import MChip from '../../components/MChip'
|
||||
import MToggle from '../../components/MToggle'
|
||||
import MConfirmSheet from '../settings/MConfirmSheet'
|
||||
import { MAdminButton, MAdminCard, MAdminCardHead, MAdminField, MAdminRow } from './MAdminUi'
|
||||
|
||||
const SELECT_CLASS =
|
||||
'h-[42px] w-full rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 text-[0.84375rem] text-m-ink outline-none focus:border-[color:var(--m-faint)]'
|
||||
import { MAdminButton, MAdminCard, MAdminCardHead, MAdminField, MAdminRow, MAdminSelect } from './MAdminUi'
|
||||
|
||||
export default function MAdminBackupPanel() {
|
||||
const {
|
||||
@@ -219,23 +216,16 @@ export default function MAdminBackupPanel() {
|
||||
label={t('backup.auto.hour')}
|
||||
hint={serverTimezone ? t('backup.auto.hourHintTz', { format: is12h ? '12h' : '24h', timezone: serverTimezone }) : t('backup.auto.hourHint', { format: is12h ? '12h' : '24h' })}
|
||||
>
|
||||
<select
|
||||
<MAdminSelect
|
||||
title={t('backup.auto.hour')}
|
||||
value={String(autoSettings.hour)}
|
||||
onChange={e => handleAutoSettingsChange('hour', Number.parseInt(e.target.value, 10))}
|
||||
className={SELECT_CLASS}
|
||||
>
|
||||
{HOURS.map(h => {
|
||||
let label: string
|
||||
if (is12h) {
|
||||
const period = h >= 12 ? 'PM' : 'AM'
|
||||
const h12 = h === 0 ? 12 : h > 12 ? h - 12 : h
|
||||
label = `${h12}:00 ${period}`
|
||||
} else {
|
||||
label = `${String(h).padStart(2, '0')}:00`
|
||||
}
|
||||
return <option key={h} value={String(h)}>{label}</option>
|
||||
onChange={value => handleAutoSettingsChange('hour', Number.parseInt(value, 10))}
|
||||
options={HOURS.map(h => {
|
||||
if (!is12h) return { value: String(h), label: `${String(h).padStart(2, '0')}:00` }
|
||||
const h12 = h === 0 ? 12 : h > 12 ? h - 12 : h
|
||||
return { value: String(h), label: `${h12}:00 ${h >= 12 ? 'PM' : 'AM'}` }
|
||||
})}
|
||||
</select>
|
||||
/>
|
||||
</MAdminField>
|
||||
)}
|
||||
|
||||
@@ -259,15 +249,12 @@ export default function MAdminBackupPanel() {
|
||||
{/* Day of month (for monthly) */}
|
||||
{autoSettings.interval === 'monthly' && (
|
||||
<MAdminField label={t('backup.auto.dayOfMonth')} hint={t('backup.auto.dayOfMonthHint')}>
|
||||
<select
|
||||
<MAdminSelect
|
||||
title={t('backup.auto.dayOfMonth')}
|
||||
value={String(autoSettings.day_of_month)}
|
||||
onChange={e => handleAutoSettingsChange('day_of_month', Number.parseInt(e.target.value, 10))}
|
||||
className={SELECT_CLASS}
|
||||
>
|
||||
{DAYS_OF_MONTH.map(d => (
|
||||
<option key={d} value={String(d)}>{String(d)}</option>
|
||||
))}
|
||||
</select>
|
||||
onChange={value => handleAutoSettingsChange('day_of_month', Number.parseInt(value, 10))}
|
||||
options={DAYS_OF_MONTH.map(d => ({ value: String(d), label: String(d) }))}
|
||||
/>
|
||||
</MAdminField>
|
||||
)}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTranslation } from '../../../i18n'
|
||||
import { PermissionLevel } from '../../../store/permissionsStore'
|
||||
import { CATEGORIES, LEVEL_LABELS, usePermissionsAdmin } from '../../../components/Admin/usePermissionsAdmin'
|
||||
import { Save, RotateCcw } from 'lucide-react'
|
||||
import { MAdminButton, MAdminCard } from './MAdminUi'
|
||||
import { MAdminButton, MAdminCard, MAdminRow, MAdminSelect } from './MAdminUi'
|
||||
import MSkeleton from '../../components/MSkeleton'
|
||||
|
||||
export default function MAdminPermissionsPanel(): React.ReactElement {
|
||||
@@ -43,40 +43,41 @@ export default function MAdminPermissionsPanel(): React.ReactElement {
|
||||
<div className="mb-2 font-geist text-[0.5625rem] font-extrabold uppercase tracking-wider text-m-faint">
|
||||
{t(`perm.cat.${cat.id}`)}
|
||||
</div>
|
||||
<div className="space-y-3">
|
||||
{cat.keys.map(key => {
|
||||
<div>
|
||||
{cat.keys.map((key, index) => {
|
||||
const entry = entryMap.get(key)
|
||||
if (!entry) return null
|
||||
const currentLevel = values[key] || entry.defaultLevel
|
||||
const isDefault = currentLevel === entry.defaultLevel
|
||||
return (
|
||||
<div key={key}>
|
||||
<div className="mb-[6px] flex items-start gap-2">
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-[0.8125rem] font-bold text-m-ink">{t(`perm.action.${key}`)}</div>
|
||||
<div className="mt-[1px] font-geist text-[0.625rem] leading-relaxed text-m-muted">
|
||||
{t(`perm.actionHint.${key}`)}
|
||||
</div>
|
||||
</div>
|
||||
{!isDefault && (
|
||||
<span className="mt-[1px] flex-none rounded-full bg-[color:color-mix(in_srgb,var(--m-st-pending)_14%,transparent)] px-[7px] py-[2px] font-geist text-[0.5625rem] font-bold text-[color:var(--m-st-pending)]">
|
||||
{t('perm.customized')}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<select
|
||||
value={currentLevel}
|
||||
onChange={(e) => handleChange(key, e.target.value as PermissionLevel)}
|
||||
aria-label={t(`perm.action.${key}`)}
|
||||
className="h-[42px] w-full rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 text-[0.84375rem] text-m-ink outline-none"
|
||||
>
|
||||
{entry.allowedLevels.map(l => (
|
||||
<option key={l} value={l}>
|
||||
{t(LEVEL_LABELS[l] || l)}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<MAdminRow
|
||||
key={key}
|
||||
first={index === 0}
|
||||
title={
|
||||
<span className="inline-flex max-w-full items-center gap-[6px]">
|
||||
<span className="min-w-0">{t(`perm.action.${key}`)}</span>
|
||||
{/* A changed rule wears the pending dot; its name is in the title for a screen reader. */}
|
||||
{!isDefault && (
|
||||
<span
|
||||
title={t('perm.customized')}
|
||||
className="h-[6px] w-[6px] flex-none rounded-full bg-[color:var(--m-st-pending)]"
|
||||
>
|
||||
<span className="sr-only">{t('perm.customized')}</span>
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
}
|
||||
hint={t(`perm.actionHint.${key}`)}
|
||||
trailing={
|
||||
<MAdminSelect
|
||||
compact
|
||||
title={t(`perm.action.${key}`)}
|
||||
value={currentLevel}
|
||||
onChange={(level) => handleChange(key, level as PermissionLevel)}
|
||||
options={entry.allowedLevels.map((level) => ({ value: level, label: t(LEVEL_LABELS[level] || level) }))}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ import MToggle from '../../components/MToggle'
|
||||
import MSheet from '../../components/MSheet'
|
||||
import MSegmented from '../../components/MSegmented'
|
||||
import MConfirmSheet from '../settings/MConfirmSheet'
|
||||
import { MAdminButton, MAdminSheetFrame } from './MAdminUi'
|
||||
import { MAdminButton, MAdminSelect, MAdminSheetFrame } from './MAdminUi'
|
||||
import {
|
||||
KNOWN_TYPES, PERM_KEYS, blockIsCurrent, dependencyRows, deriveDeps, fingerprint, formatCompactCount,
|
||||
installOffer, isRegistrySourced, parseJson, signatureBlockView, sortLabel, statusLabel,
|
||||
@@ -437,14 +437,12 @@ export default function MAdminPluginsPanel() {
|
||||
ariaLabel={f.label || f.key}
|
||||
/>
|
||||
) : f.input_type === 'select' && f.options ? (
|
||||
<select
|
||||
<MAdminSelect
|
||||
title={f.label || f.key}
|
||||
value={String(settings.form.values[f.key] ?? '')}
|
||||
onChange={e => settings.setValue(f.key, e.target.value)}
|
||||
className="h-[42px] w-full rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 text-[0.84375rem] text-m-ink outline-none focus:border-[color:var(--m-faint)]"
|
||||
>
|
||||
<option value="">—</option>
|
||||
{f.options.map(o => <option key={o.value} value={o.value}>{o.label}</option>)}
|
||||
</select>
|
||||
onChange={value => settings.setValue(f.key, value)}
|
||||
options={[{ value: '', label: '—' }, ...f.options.map(o => ({ value: o.value, label: o.label }))]}
|
||||
/>
|
||||
) : (
|
||||
<input
|
||||
type={f.secret ? 'password' : (f.input_type === 'number' ? 'number' : 'text')}
|
||||
|
||||
@@ -22,12 +22,17 @@ import {
|
||||
interface MAdminSettingsSectionProps {
|
||||
admin: ReturnType<typeof useAdmin>
|
||||
t: TranslationFn
|
||||
/**
|
||||
* Which section this renders, cut the way the desktop tabs are: who may sign
|
||||
* in and what it takes (security), what the install talks to outside
|
||||
* (services), and the setup of the features the addons switch on (features).
|
||||
*/
|
||||
part: 'security' | 'services' | 'features'
|
||||
}
|
||||
|
||||
// Settings section: auth methods, passkey login, require-MFA, allowed file
|
||||
// types, API keys, OIDC and the danger zone — the full desktop settings tab
|
||||
// relaid as mobile cards. All state and mutations come from useAdmin.
|
||||
export default function MAdminSettingsSection({ admin, t }: MAdminSettingsSectionProps) {
|
||||
// The admin's security, services and feature setup sections as phone cards.
|
||||
// All state and mutations come from useAdmin.
|
||||
export default function MAdminSettingsSection({ admin, t, part }: MAdminSettingsSectionProps) {
|
||||
const [providerPickerOpen, setProviderPickerOpen] = useState(false)
|
||||
const {
|
||||
placesPhotosEnabled, placesAutocompleteEnabled, placesDetailsEnabled, placesEnrichEnabled,
|
||||
@@ -53,9 +58,26 @@ export default function MAdminSettingsSection({ admin, t }: MAdminSettingsSectio
|
||||
togglePlaceShadow,
|
||||
} = useAdminSettingsActions(admin, t)
|
||||
|
||||
return (
|
||||
if (part === 'features') {
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{/* Live flight status: open ADS-B data, no key, on by default (desktop parity). */}
|
||||
<FlightLiveCard
|
||||
t={t}
|
||||
managed={!!managed}
|
||||
on={flightLive}
|
||||
locked={flightLiveLocked}
|
||||
onChange={(v) => void handleToggleAuthSetting('flight_live_enabled', v, setFlightLive)}
|
||||
/>
|
||||
{/* Booking mail import: self-hosted only, the operator runs the TREK Cloud relay (desktop parity). */}
|
||||
{!managed && <MMailIngestAdminCard />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (part === 'security') return (
|
||||
<div className="space-y-3">
|
||||
{/* Authentication methods */}
|
||||
{/* Authentication methods, with the passkey switch and the 2FA rule: they are ways in too. */}
|
||||
<MAdminCard>
|
||||
<MAdminCardHead title={t('admin.authMethods')} />
|
||||
{envOverrideOidcOnly && (
|
||||
@@ -127,11 +149,6 @@ export default function MAdminSettingsSection({ admin, t }: MAdminSettingsSectio
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</MAdminCard>
|
||||
|
||||
{/* Passkey login */}
|
||||
<MAdminCard>
|
||||
<MAdminCardHead title={t('admin.passkey.title')} hint={t('admin.passkey.cardHint')} />
|
||||
<MAdminRow
|
||||
title={t('admin.passkey.login')}
|
||||
hint={t('admin.passkey.loginHint')}
|
||||
@@ -143,15 +160,26 @@ export default function MAdminSettingsSection({ admin, t }: MAdminSettingsSectio
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<MAdminRow
|
||||
title={t('admin.requireMfa')}
|
||||
hint={t('admin.requireMfaHint')}
|
||||
trailing={
|
||||
<MToggle checked={requireMfa} ariaLabel={t('admin.requireMfa')} onChange={handleToggleRequireMfa} />
|
||||
}
|
||||
/>
|
||||
</MAdminCard>
|
||||
|
||||
{/* The passkey domain: the instance's address, which the operator owns on a
|
||||
managed install (server managed.ts), same as the desktop tab. */}
|
||||
{!managed && (
|
||||
<MAdminCard>
|
||||
<MAdminCardHead title={t('admin.passkey.title')} hint={t('admin.passkey.cardHint')} />
|
||||
{passkeyLogin && !passkeyConfigured && (
|
||||
<p className="mb-3 flex items-start gap-2 rounded-xl border border-[color:color-mix(in_srgb,var(--m-st-pending)_28%,transparent)] bg-[color:color-mix(in_srgb,var(--m-st-pending)_10%,transparent)] px-3 py-2 font-geist text-[0.625rem] leading-relaxed text-m-ink">
|
||||
<AlertTriangle size={14} className="mt-[1px] flex-none text-[color:var(--m-st-pending)]" />
|
||||
{t('admin.passkey.notConfigured')}
|
||||
</p>
|
||||
)}
|
||||
{/* The relying party is the instance's address, which the operator owns on a
|
||||
managed install (server managed.ts), same as the desktop tab. */}
|
||||
{!managed && (
|
||||
<div className="space-y-3">
|
||||
<MAdminField label={t('admin.passkey.rpId')} hint={t('admin.passkey.rpIdHint')}>
|
||||
<MAdminInput
|
||||
@@ -173,51 +201,39 @@ export default function MAdminSettingsSection({ admin, t }: MAdminSettingsSectio
|
||||
{t('common.save')}
|
||||
</MAdminButton>
|
||||
</div>
|
||||
)}
|
||||
</MAdminCard>
|
||||
)}
|
||||
|
||||
{/* Require 2FA */}
|
||||
<MAdminCard>
|
||||
{/* OIDC / SSO: the operator's on a managed install, as on the desktop tab. */}
|
||||
{!managed && <MAdminOidcCard admin={admin} t={t} onSave={saveOidc} />}
|
||||
|
||||
{/* Last and on its own, not beside a harmless switch. Rotating the secret fixes
|
||||
nothing an instance admin of a managed install can reach. */}
|
||||
{!managed && (
|
||||
<MAdminCard className="border-[color:color-mix(in_srgb,var(--m-st-danger)_28%,transparent)]">
|
||||
<div className="mb-1 flex items-center gap-2 text-[color:var(--m-st-danger)]">
|
||||
<AlertTriangle size={14} strokeWidth={2.2} />
|
||||
<span className="text-[length:calc(14px*var(--fs-scale-body,1))] font-extrabold">{t('admin.danger.title')}</span>
|
||||
</div>
|
||||
<MAdminRow
|
||||
first
|
||||
title={t('admin.requireMfa')}
|
||||
hint={t('admin.requireMfaHint')}
|
||||
title={t('admin.rotateJwt.title')}
|
||||
hint={t('admin.rotateJwt.hint')}
|
||||
trailing={
|
||||
<MToggle checked={requireMfa} ariaLabel={t('admin.requireMfa')} onChange={handleToggleRequireMfa} />
|
||||
<MAdminButton variant="danger" onClick={() => setShowRotateJwtModal(true)}>
|
||||
<RefreshCw size={12} strokeWidth={2.2} />
|
||||
{t('admin.rotateJwt.button')}
|
||||
</MAdminButton>
|
||||
}
|
||||
/>
|
||||
</MAdminCard>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
{/* Live flight status: open ADS-B data, no key, on by default (desktop parity). */}
|
||||
<FlightLiveCard
|
||||
t={t}
|
||||
managed={!!managed}
|
||||
on={flightLive}
|
||||
locked={flightLiveLocked}
|
||||
onChange={(v) => void handleToggleAuthSetting('flight_live_enabled', v, setFlightLive)}
|
||||
/>
|
||||
|
||||
{/* Booking mail import: self-hosted only, the operator runs the TREK Cloud relay (desktop parity). */}
|
||||
{!managed && <MMailIngestAdminCard />}
|
||||
|
||||
{/* Allowed file types */}
|
||||
<MAdminCard>
|
||||
<MAdminCardHead title={t('admin.fileTypes')} hint={t('admin.fileTypesHint')} />
|
||||
<div className="space-y-3">
|
||||
<MAdminField label={t('admin.fileTypes')} hint={t('admin.fileTypesFormat')}>
|
||||
<MAdminInput
|
||||
type="text"
|
||||
value={allowedFileTypes}
|
||||
onChange={(e) => setAllowedFileTypes(e.target.value)}
|
||||
placeholder="jpg,png,pdf,doc,docx,xls,xlsx,txt,csv"
|
||||
/>
|
||||
</MAdminField>
|
||||
<MAdminButton busy={savingFileTypes} onClick={saveFileTypes}>
|
||||
{t('common.save')}
|
||||
</MAdminButton>
|
||||
</div>
|
||||
</MAdminCard>
|
||||
|
||||
// Services: what the install talks to outside, and the file types it takes.
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{/* API keys, place search and routing: the operator's on a managed install,
|
||||
same as the desktop tab, so the whole card is left out. Unlike the desktop
|
||||
tab, the phone has no share place details section for a managed install. */}
|
||||
@@ -409,26 +425,22 @@ export default function MAdminSettingsSection({ admin, t }: MAdminSettingsSectio
|
||||
</MAdminCard>
|
||||
)}
|
||||
|
||||
{/* OIDC / SSO: the operator's on a managed install, as on the desktop tab. */}
|
||||
{!managed && <MAdminOidcCard admin={admin} t={t} onSave={saveOidc} />}
|
||||
|
||||
{/* Danger zone */}
|
||||
<MAdminCard className="border-[color:color-mix(in_srgb,var(--m-st-danger)_28%,transparent)]">
|
||||
<div className="mb-1 flex items-center gap-2 text-[color:var(--m-st-danger)]">
|
||||
<AlertTriangle size={14} strokeWidth={2.2} />
|
||||
<span className="text-[0.875rem] font-extrabold">{t('admin.danger.title')}</span>
|
||||
{/* Allowed file types */}
|
||||
<MAdminCard>
|
||||
<MAdminCardHead title={t('admin.fileTypes')} hint={t('admin.fileTypesHint')} />
|
||||
<div className="space-y-3">
|
||||
<MAdminField label={t('admin.fileTypes')} hint={t('admin.fileTypesFormat')}>
|
||||
<MAdminInput
|
||||
type="text"
|
||||
value={allowedFileTypes}
|
||||
onChange={(e) => setAllowedFileTypes(e.target.value)}
|
||||
placeholder="jpg,png,pdf,doc,docx,xls,xlsx,txt,csv"
|
||||
/>
|
||||
</MAdminField>
|
||||
<MAdminButton busy={savingFileTypes} onClick={saveFileTypes}>
|
||||
{t('common.save')}
|
||||
</MAdminButton>
|
||||
</div>
|
||||
<MAdminRow
|
||||
first
|
||||
title={t('admin.rotateJwt.title')}
|
||||
hint={t('admin.rotateJwt.hint')}
|
||||
trailing={
|
||||
<MAdminButton variant="danger" onClick={() => setShowRotateJwtModal(true)}>
|
||||
<RefreshCw size={12} strokeWidth={2.2} />
|
||||
{t('admin.rotateJwt.button')}
|
||||
</MAdminButton>
|
||||
}
|
||||
/>
|
||||
</MAdminCard>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { InputHTMLAttributes, ReactNode, useState } from 'react'
|
||||
import { Eye, EyeOff, Loader2, X } from 'lucide-react'
|
||||
import { ChevronDown, Eye, EyeOff, Loader2, X } from 'lucide-react'
|
||||
import { useTranslation } from '../../../i18n'
|
||||
import MIconBtn from '../../components/MIconBtn'
|
||||
import MHintLabel from '../../components/MHintLabel'
|
||||
import MSetPickerSheet, { type MSetPickerOption } from '../settings/MSetPickerSheet'
|
||||
|
||||
/** Opaque content card of the admin screen (r18, --m-sheetop on --m-rowbr). */
|
||||
export function MAdminCard({ className = '', children }: { className?: string; children: ReactNode }) {
|
||||
@@ -33,7 +35,7 @@ export function MAdminCardHead({
|
||||
)
|
||||
}
|
||||
|
||||
/** Settings row: bold 13px title + Geist hint on the left, control on the right. */
|
||||
/** Settings row: bold 13px title (its hint behind the info mark) on the left, control on the right. */
|
||||
export function MAdminRow({
|
||||
title,
|
||||
hint,
|
||||
@@ -52,8 +54,7 @@ export function MAdminRow({
|
||||
}`}
|
||||
>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-[0.8125rem] font-bold text-m-ink">{title}</div>
|
||||
{hint && <div className="mt-[1px] font-geist text-[0.625rem] leading-relaxed text-m-muted">{hint}</div>}
|
||||
<MHintLabel label={title} hint={hint} />
|
||||
</div>
|
||||
{trailing}
|
||||
</div>
|
||||
@@ -79,13 +80,18 @@ export function MAdminClampedText({ children, className = '' }: { children: stri
|
||||
)
|
||||
}
|
||||
|
||||
/** Labelled form field with an optional hint line under the control. */
|
||||
/** Labelled form field; its hint waits behind the label's info mark. */
|
||||
export function MAdminField({ label, hint, children }: { label: ReactNode; hint?: ReactNode; children: ReactNode }) {
|
||||
return (
|
||||
<div>
|
||||
<div className="mb-[5px] font-geist text-[0.625rem] font-bold uppercase tracking-[.09em] text-m-faint">{label}</div>
|
||||
<div className="mb-[5px]">
|
||||
<MHintLabel
|
||||
label={label}
|
||||
hint={hint}
|
||||
labelClassName="font-geist text-[0.625rem] font-bold uppercase tracking-[.09em] text-m-faint"
|
||||
/>
|
||||
</div>
|
||||
{children}
|
||||
{hint && <div className="mt-[5px] font-geist text-[0.625rem] leading-relaxed text-m-muted">{hint}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -198,3 +204,54 @@ export function MAdminSheetFrame({
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
interface MAdminSelectProps {
|
||||
value: string
|
||||
options: MSetPickerOption[]
|
||||
onChange: (value: string) => void
|
||||
/** The picker sheet's title and the control's accessible name. */
|
||||
title: string
|
||||
disabled?: boolean
|
||||
/** A small pill for the end of a row instead of a full-width field. */
|
||||
compact?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* The phone's select: TREK's own field (or a pill at the end of a row) that
|
||||
* opens the bottom picker sheet. A native <select> is drawn by the operating
|
||||
* system and was the one control on these screens that did not look like TREK.
|
||||
*/
|
||||
export function MAdminSelect({ value, options, onChange, title, disabled = false, compact = false }: MAdminSelectProps) {
|
||||
const [open, setOpen] = useState(false)
|
||||
const current = options.find((option) => option.value === value)
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
// ARIA 1.2's select-only combobox: the button names the value, the sheet is its popup.
|
||||
role="combobox"
|
||||
aria-label={title}
|
||||
aria-haspopup="dialog"
|
||||
aria-expanded={open}
|
||||
disabled={disabled}
|
||||
onClick={() => setOpen(true)}
|
||||
className={
|
||||
compact
|
||||
? 'inline-flex h-[30px] max-w-[52%] flex-none items-center gap-[5px] rounded-full border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] ps-[11px] pe-[8px] text-[length:calc(11.5px*var(--fs-scale-body,1))] font-bold text-m-ink disabled:opacity-50'
|
||||
: 'flex h-[42px] w-full items-center gap-2 rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 text-start text-[length:calc(13.5px*var(--fs-scale-body,1))] text-m-ink disabled:opacity-50'
|
||||
}
|
||||
>
|
||||
<span className="min-w-0 flex-1 truncate text-start">{current?.label ?? value}</span>
|
||||
<ChevronDown size={compact ? 13 : 15} strokeWidth={2.2} className="flex-none text-m-faint" aria-hidden />
|
||||
</button>
|
||||
<MSetPickerSheet
|
||||
open={open}
|
||||
onClose={() => setOpen(false)}
|
||||
title={title}
|
||||
value={value}
|
||||
options={options}
|
||||
onSelect={(next) => { if (next !== value) onChange(next) }}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import MAdminPermissionsPanel from './MAdminPermissionsPanel'
|
||||
import MSheet from '../../components/MSheet'
|
||||
import MChip from '../../components/MChip'
|
||||
import MConfirmSheet from '../settings/MConfirmSheet'
|
||||
import { MAdminButton, MAdminCard, MAdminField, MAdminSheetFrame } from './MAdminUi'
|
||||
import { MAdminButton, MAdminCard, MAdminField, MAdminSelect, MAdminSheetFrame } from './MAdminUi'
|
||||
import MSkeleton from '../../components/MSkeleton'
|
||||
|
||||
interface MAdminUsersSectionProps {
|
||||
@@ -213,20 +213,15 @@ export default function MAdminUsersSection({ admin, t, locale }: MAdminUsersSect
|
||||
</MAdminField>
|
||||
{inviteTrips.length > 0 && (
|
||||
<MAdminField label={t('admin.invite.tripLabel')} hint={t('admin.invite.tripHint')}>
|
||||
<select
|
||||
value={inviteForm.trip_id}
|
||||
onChange={(e) =>
|
||||
setInviteForm((f) => ({ ...f, trip_id: e.target.value === '' ? '' : Number(e.target.value) }))
|
||||
}
|
||||
className="h-[42px] w-full rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 text-[0.84375rem] text-m-ink outline-none"
|
||||
>
|
||||
<option value="">{t('admin.invite.tripNone')}</option>
|
||||
{inviteTrips.map((tr) => (
|
||||
<option key={tr.id} value={tr.id}>
|
||||
{tr.title}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<MAdminSelect
|
||||
title={t('admin.invite.tripLabel')}
|
||||
value={String(inviteForm.trip_id)}
|
||||
onChange={(value) => setInviteForm((f) => ({ ...f, trip_id: value === '' ? '' : Number(value) }))}
|
||||
options={[
|
||||
{ value: '', label: t('admin.invite.tripNone') },
|
||||
...inviteTrips.map((tr) => ({ value: String(tr.id), label: tr.title })),
|
||||
]}
|
||||
/>
|
||||
</MAdminField>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -152,7 +152,7 @@ function MAssistantBehaviour() {
|
||||
<div className="mt-3 border-t border-[color:var(--m-rowbr)]">
|
||||
<MSetRow
|
||||
label={t('assistant.settings.followMap')}
|
||||
sub={t('assistant.settings.followMapHint')}
|
||||
hint={t('assistant.settings.followMapHint')}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={follow.on}
|
||||
@@ -163,7 +163,7 @@ function MAssistantBehaviour() {
|
||||
/>
|
||||
<MSetRow
|
||||
label={t('assistant.settings.costEstimates')}
|
||||
sub={t('assistant.settings.costEstimatesHint')}
|
||||
hint={t('assistant.settings.costEstimatesHint')}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={costs.on}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default function MAirTrailConnectionSection(): React.ReactElement {
|
||||
/>
|
||||
<MSetRow
|
||||
label={t('settings.airtrail.writeBack')}
|
||||
sub={t('settings.airtrail.writeBackHint')}
|
||||
hint={t('settings.airtrail.writeBackHint')}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={writeEnabled}
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function MAppLockCard() {
|
||||
<MSetRow
|
||||
first
|
||||
label={t('native.lock.setting')}
|
||||
sub={t('native.lock.settingHint')}
|
||||
hint={t('native.lock.settingHint')}
|
||||
trailing={<MToggle checked={enabled} onChange={() => void toggle()} ariaLabel={t('native.lock.setting')} />}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -52,14 +52,14 @@ export default function MDawarichConnectionSection(): React.ReactElement {
|
||||
<MSetRow
|
||||
first
|
||||
label={t('dawarich.syncEnabled')}
|
||||
sub={t('dawarich.syncEnabledHint')}
|
||||
hint={t('dawarich.syncEnabledHint')}
|
||||
trailing={
|
||||
<MToggle checked={S.syncEnabled} onChange={S.toggleSync} ariaLabel={t('dawarich.syncEnabled')} />
|
||||
}
|
||||
/>
|
||||
<MSetRow
|
||||
label={t('dawarich.allowInsecureTls')}
|
||||
sub={t('dawarich.allowInsecureTlsHint')}
|
||||
hint={t('dawarich.allowInsecureTlsHint')}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={S.allowInsecureTls}
|
||||
|
||||
@@ -71,7 +71,7 @@ export default function MLlmConnectionSection(): React.ReactElement {
|
||||
<MSetRow
|
||||
first
|
||||
label={t('settings.aiParsing.multimodal')}
|
||||
sub={t('settings.aiParsing.multimodalHint')}
|
||||
hint={t('settings.aiParsing.multimodalHint')}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={multimodal}
|
||||
|
||||
@@ -61,7 +61,7 @@ export default function MMailImportSection(): ReactElement | null {
|
||||
<MSetRow
|
||||
first
|
||||
label={t('mailInbox.settings.enabled')}
|
||||
sub={t('mailInbox.settings.enabledHint')}
|
||||
hint={t('mailInbox.settings.enabledHint')}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={prefs.enabled}
|
||||
@@ -89,7 +89,7 @@ export default function MMailImportSection(): ReactElement | null {
|
||||
/>
|
||||
<MSetRow
|
||||
label={t('mailInbox.settings.autoAdd')}
|
||||
sub={t('mailInbox.settings.autoAddHint')}
|
||||
hint={t('mailInbox.settings.autoAddHint')}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={prefs.auto_add}
|
||||
|
||||
@@ -189,12 +189,12 @@ export default function MSettingsAppearance() {
|
||||
<MSetRow
|
||||
first
|
||||
label={t('settings.appearance.transparency')}
|
||||
sub={t('settings.appearance.transparencyHint')}
|
||||
hint={t('settings.appearance.transparencyHint')}
|
||||
trailing={<MToggle checked={cfg.transparency} onChange={(v) => update({ transparency: v })} ariaLabel={t('settings.appearance.transparency')} />}
|
||||
/>
|
||||
<MSetRow
|
||||
label={t('settings.appearance.reduceMotion')}
|
||||
sub={t('settings.appearance.reduceMotionHint')}
|
||||
hint={t('settings.appearance.reduceMotionHint')}
|
||||
trailing={<MToggle checked={cfg.reduceMotion} onChange={(v) => update({ reduceMotion: v })} ariaLabel={t('settings.appearance.reduceMotion')} />}
|
||||
/>
|
||||
</div>
|
||||
@@ -253,7 +253,7 @@ export default function MSettingsAppearance() {
|
||||
<MSetRow
|
||||
first
|
||||
label={t(`settings.appearance.widget.${g.master}`)}
|
||||
sub={t('settings.appearance.sidebarHint')}
|
||||
hint={t('settings.appearance.sidebarHint')}
|
||||
trailing={<MToggle checked={masterOn} onChange={(v) => setWidget('desktop', g.master as string, v)} ariaLabel={t(`settings.appearance.widget.${g.master}`)} />}
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -194,7 +194,7 @@ export default function MSettingsGeneral() {
|
||||
<MSetRow
|
||||
key={row.key as string}
|
||||
label={row.label}
|
||||
sub={row.sub}
|
||||
hint={row.sub}
|
||||
trailing={
|
||||
<MToggle
|
||||
checked={row.on}
|
||||
|
||||
@@ -154,17 +154,17 @@ export default function MSettingsMap() {
|
||||
<div className="mt-1">
|
||||
<MSetRow
|
||||
label={t('settings.map3dBuildings')}
|
||||
sub={t('settings.map3dHint')}
|
||||
hint={t('settings.map3dHint')}
|
||||
trailing={<MToggle checked={mapbox3d} onChange={setMapbox3d} ariaLabel={t('settings.map3dBuildings')} />}
|
||||
/>
|
||||
<MSetRow
|
||||
label={t('settings.mapHighQuality')}
|
||||
sub={`${t('settings.mapHighQualityHint')} ${t('settings.mapHighQualityWarning')}`}
|
||||
hint={`${t('settings.mapHighQualityHint')} ${t('settings.mapHighQualityWarning')}`}
|
||||
trailing={<MToggle checked={mapboxQuality} onChange={setMapboxQuality} ariaLabel={t('settings.mapHighQuality')} />}
|
||||
/>
|
||||
<MSetRow
|
||||
label={t('settings.mapHidePois')}
|
||||
sub={t('settings.mapHidePoisHint')}
|
||||
hint={t('settings.mapHidePoisHint')}
|
||||
trailing={<MToggle checked={hideBasemapPois} onChange={setHideBasemapPois} ariaLabel={t('settings.mapHidePois')} />}
|
||||
/>
|
||||
<p className="rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] p-3 font-geist text-[0.625rem] leading-relaxed text-m-muted">
|
||||
|
||||
@@ -329,7 +329,7 @@ export default function MSettingsMcp() {
|
||||
|
||||
<MSetRow
|
||||
label={t('settings.oauth.modal.machineClient')}
|
||||
sub={t('settings.oauth.modal.machineClientHint')}
|
||||
hint={t('settings.oauth.modal.machineClientHint')}
|
||||
trailing={<MToggle checked={isMachine} onChange={setIsMachine} ariaLabel={t('settings.oauth.modal.machineClient')} />}
|
||||
/>
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ export default function MSettingsOffline() {
|
||||
<MSetRow
|
||||
first
|
||||
label={t('settings.offline.mode.force')}
|
||||
sub={t('settings.offline.mode.forceHint')}
|
||||
hint={t('settings.offline.mode.forceHint')}
|
||||
trailing={<MToggle checked={forced} onChange={handleToggleForce} ariaLabel={t('settings.offline.mode.force')} />}
|
||||
/>
|
||||
</div>
|
||||
@@ -157,7 +157,7 @@ export default function MSettingsOffline() {
|
||||
<MSetRow
|
||||
first
|
||||
label={t('settings.offline.storage.tiles')}
|
||||
sub={t('settings.offline.storage.tilesHint')}
|
||||
hint={t('settings.offline.storage.tilesHint')}
|
||||
trailing={<MToggle checked={prefs.cacheTiles} onChange={handleToggleTiles} ariaLabel={t('settings.offline.storage.tiles')} />}
|
||||
/>
|
||||
{/* The iOS app's own store of the map tiles looked at, beside the trip regions above. */}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React, { ReactNode } from 'react'
|
||||
import type { LucideIcon } from 'lucide-react'
|
||||
import MHintLabel from '../../components/MHintLabel'
|
||||
|
||||
/**
|
||||
* Shared building blocks of the mobile settings screen, all straight from the
|
||||
@@ -125,17 +126,20 @@ export function MSetOnOff({ on, onChange, onLabel, offLabel, ariaLabel }: MSetOn
|
||||
|
||||
interface MSetRowProps {
|
||||
label: ReactNode
|
||||
/** A value under the label (a host, a size, a date): always shown. */
|
||||
sub?: ReactNode
|
||||
/** What the setting does: behind the label's info mark, as on the desktop. */
|
||||
hint?: ReactNode
|
||||
trailing?: ReactNode
|
||||
first?: boolean
|
||||
}
|
||||
|
||||
/** Setting row with label + Geist sub line and a trailing control. */
|
||||
export function MSetRow({ label, sub, trailing, first = false }: MSetRowProps) {
|
||||
/** Setting row with label (and its hint behind the info mark), an optional value line and a trailing control. */
|
||||
export function MSetRow({ label, sub, hint, trailing, first = false }: MSetRowProps) {
|
||||
return (
|
||||
<div className={`flex items-center gap-[10px] py-[10px] ${first ? '' : 'border-t border-[color:var(--m-rowbr)]'}`}>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-[0.78125rem] font-bold text-m-ink">{label}</div>
|
||||
<MHintLabel label={label} hint={hint} labelClassName="text-[length:calc(12.5px*var(--fs-scale-body,1))] font-bold text-m-ink" />
|
||||
{sub && <div className="mt-[1px] font-geist text-[0.625rem] text-m-muted">{sub}</div>}
|
||||
</div>
|
||||
{trailing}
|
||||
@@ -188,7 +192,7 @@ export function MSetButton({ onClick, disabled = false, variant = 'primary', cla
|
||||
type="button"
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
className={`inline-flex items-center justify-center gap-[6px] rounded-full px-4 py-[9px] text-[0.78125rem] font-bold disabled:opacity-50 ${look} ${className}`}
|
||||
className={`inline-flex shrink-0 items-center justify-center gap-[6px] whitespace-nowrap rounded-full px-4 py-[9px] text-[0.78125rem] font-bold disabled:opacity-50 ${look} ${className}`}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
|
||||
@@ -516,7 +516,7 @@ describe('AdminPage', () => {
|
||||
fireEvent.click(screen.getByRole('button', { name: /^security$/i }));
|
||||
|
||||
// The 2FA rule is a row of the sign-in card: its label left, its switch right.
|
||||
const mfaLabel = await screen.findByText('Require two-factor authentication (2FA)', { selector: 'label' });
|
||||
const mfaLabel = await screen.findByText('Require 2FA', { selector: 'label' });
|
||||
const mfaRow = mfaLabel.closest<HTMLElement>('.flex-wrap');
|
||||
fireEvent.click(within(mfaRow!).getByRole('button'));
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ describe('AdminSettingsTab', () => {
|
||||
it('FE-ADMSET-016: require-MFA toggle flips the current value', () => {
|
||||
const admin = renderTab({ requireMfa: false });
|
||||
|
||||
fireEvent.click(toggleFor('Require two-factor authentication (2FA)'));
|
||||
fireEvent.click(toggleFor('Require 2FA'));
|
||||
|
||||
expect(admin.handleToggleRequireMfa).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import { screen, within } from '@testing-library/react';
|
||||
import type { UserEvent } from '@testing-library/user-event';
|
||||
|
||||
/**
|
||||
* Picks an option of the phone's own select (MAdminSelect): taps the combobox
|
||||
* named `name`, then the option labelled `option` in the picker sheet it opens.
|
||||
*/
|
||||
export async function pickMobileOption(user: UserEvent, name: string, option: string): Promise<void> {
|
||||
await user.click(screen.getByRole('combobox', { name }));
|
||||
const sheet = await screen.findByRole('dialog', { name });
|
||||
await user.click(within(sheet).getByRole('button', { name: option }));
|
||||
}
|
||||
|
||||
/** The labels a phone select offers, read from its open picker sheet. */
|
||||
export async function mobileOptionLabels(user: UserEvent, name: string): Promise<string[]> {
|
||||
await user.click(screen.getByRole('combobox', { name }));
|
||||
const sheet = await screen.findByRole('dialog', { name });
|
||||
return within(sheet)
|
||||
.getAllByRole('button')
|
||||
.filter((button) => button.getAttribute('aria-label') === null)
|
||||
.map((button) => button.textContent ?? '');
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// FE-MOB-HINT-001 to FE-MOB-HINT-004
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import MHintLabel from '../../../src/mobile/components/MHintLabel';
|
||||
import { render, screen } from '../../helpers/render';
|
||||
|
||||
describe('MHintLabel', () => {
|
||||
it('FE-MOB-HINT-001: without a hint it is the label alone, with no mark', () => {
|
||||
render(<MHintLabel label="Password Login" />);
|
||||
expect(screen.getByText('Password Login')).toBeInTheDocument();
|
||||
expect(screen.queryByTestId('m-hint-mark')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-HINT-002: the hint stays in the page for a screen reader while the mark is closed', () => {
|
||||
render(<MHintLabel label="Password Login" hint="Allow sign in with email and password" />);
|
||||
const hint = screen.getByText('Allow sign in with email and password');
|
||||
expect(hint).toHaveClass('sr-only');
|
||||
expect(screen.getByTestId('m-hint-mark')).toHaveAttribute('aria-hidden', 'true');
|
||||
});
|
||||
|
||||
it('FE-MOB-HINT-003: a tap on the mark shows the hint and a second one folds it again', async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<MHintLabel label="Password Login" hint="Allow sign in with email and password" />);
|
||||
const mark = screen.getByTestId('m-hint-mark');
|
||||
|
||||
await user.click(mark);
|
||||
expect(screen.getByText('Allow sign in with email and password')).not.toHaveClass('sr-only');
|
||||
|
||||
await user.click(mark);
|
||||
expect(screen.getByText('Allow sign in with email and password')).toHaveClass('sr-only');
|
||||
});
|
||||
|
||||
it('FE-MOB-HINT-004: the label takes the class it is given', () => {
|
||||
render(<MHintLabel label="Files" hint="Uploads" labelClassName="uppercase" />);
|
||||
expect(screen.getByText('Files')).toHaveClass('uppercase');
|
||||
});
|
||||
});
|
||||
@@ -137,7 +137,7 @@ describe('MAdmin', () => {
|
||||
expect(screen.getByText('8')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-ADMIN-002: the section dropdown switches to the settings section', async () => {
|
||||
it('FE-MOB-ADMIN-002: the section dropdown switches to the security section', async () => {
|
||||
render(<MAdmin />);
|
||||
await waitFor(() => expect(screen.getByText('alice')).toBeInTheDocument());
|
||||
|
||||
@@ -148,18 +148,22 @@ describe('MAdmin', () => {
|
||||
expect(screen.getByRole('button', { name: 'Defaults' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Backup' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Audit' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Services' })).toBeInTheDocument();
|
||||
// Under the desktop sidebar's group headings
|
||||
expect(screen.getByText('Configuration')).toBeInTheDocument();
|
||||
expect(screen.getByText('Maintenance')).toBeInTheDocument();
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Settings' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Security' }));
|
||||
|
||||
// Settings section renders the auth methods card, user list is gone
|
||||
// Security renders the auth methods card, user list is gone
|
||||
await waitFor(() => expect(screen.getByText('Authentication Methods')).toBeInTheDocument());
|
||||
expect(screen.queryByText('alice')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-ADMIN-002b: a link to the desktop Security or Services tab opens the Settings section', async () => {
|
||||
for (const tab of ['security', 'services', 'settings']) {
|
||||
it('FE-MOB-ADMIN-002b: a link to a desktop tab opens the same section, an old Settings link Security', async () => {
|
||||
for (const [tab, card] of [['security', 'Authentication Methods'], ['settings', 'Authentication Methods'], ['services', 'API Keys']]) {
|
||||
const { unmount } = render(<MAdmin />, { initialEntries: [`/admin?tab=${tab}`] });
|
||||
await waitFor(() => expect(screen.getByText('Authentication Methods')).toBeInTheDocument());
|
||||
await waitFor(() => expect(screen.getByText(card)).toBeInTheDocument());
|
||||
unmount();
|
||||
}
|
||||
});
|
||||
@@ -449,9 +453,9 @@ describe('MAdmin', () => {
|
||||
// No dropdown pill on top of the page: the list beside it is the switcher.
|
||||
expect(screen.queryByRole('button', { name: 'Administration', expanded: false })).not.toBeInTheDocument();
|
||||
|
||||
fireEvent.click(within(sections).getByRole('button', { name: 'Settings' }));
|
||||
fireEvent.click(within(sections).getByRole('button', { name: 'Security' }));
|
||||
await waitFor(() => expect(screen.getByText('Authentication Methods')).toBeInTheDocument());
|
||||
expect(within(sections).getByRole('button', { name: 'Settings' })).toHaveAttribute('aria-current', 'page');
|
||||
expect(within(sections).getByRole('button', { name: 'Security' })).toHaveAttribute('aria-current', 'page');
|
||||
|
||||
fireEvent.click(within(sections).getByRole('button', { name: 'Create User' }));
|
||||
expect(screen.getByRole('dialog', { name: 'Create User' })).toBeInTheDocument();
|
||||
|
||||
@@ -106,7 +106,7 @@ describe('MAdminAddonManager', () => {
|
||||
expect(await screen.findByText('No addons available')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-AADD-005: trip addons render with the section band, catalog label and type badge', async () => {
|
||||
it('FE-MOB-AADD-005: trip addons render under the section band with their catalog label, no type badge of their own', async () => {
|
||||
server.use(addonsRoute([buildAddon({ id: 'packing', name: 'Packing', enabled: true })]));
|
||||
render(<MAdminAddonManager />);
|
||||
|
||||
@@ -114,7 +114,8 @@ describe('MAdminAddonManager', () => {
|
||||
// The band names the type and says what it means on a line of its own, no dash between them.
|
||||
expect(screen.getByText('Available as a tab within each trip')).toBeInTheDocument();
|
||||
expect(screen.getByText('Packing lists and to-do tasks for your trips')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('Trip')).toHaveLength(2);
|
||||
// Only the band names the type: every row under it is of that type.
|
||||
expect(screen.getAllByText('Trip')).toHaveLength(1);
|
||||
expect(screen.getByRole('switch', { name: 'Lists' })).toHaveAttribute('aria-checked', 'true');
|
||||
});
|
||||
|
||||
@@ -275,8 +276,8 @@ describe('MAdminAddonManager', () => {
|
||||
expect(screen.getByRole('switch', { name: 'Immich' })).toHaveAttribute('aria-checked', 'true');
|
||||
// Journey + three providers, and providers are not shown as top-level rows.
|
||||
expect(screen.getAllByRole('switch')).toHaveLength(4);
|
||||
// The band and the addon's type badge both say Global.
|
||||
expect(screen.getAllByText('Global')).toHaveLength(2);
|
||||
// Only the band says Global.
|
||||
expect(screen.getAllByText('Global')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('FE-MOB-AADD-015: toggling a provider persists it and rolls back on failure', async () => {
|
||||
@@ -413,8 +414,8 @@ describe('MAdminAddonManager', () => {
|
||||
expect(screen.getByRole('switch', { name: 'Nextcloud' })).toHaveAttribute('aria-checked', 'true');
|
||||
// Documents plus two providers, and neither provider carries a type badge of its own.
|
||||
expect(screen.getAllByRole('switch')).toHaveLength(3);
|
||||
// The band and the addon's type badge.
|
||||
expect(screen.getAllByText('Trip')).toHaveLength(2);
|
||||
// The band alone names the type.
|
||||
expect(screen.getAllByText('Trip')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('FE-MOB-AADD-029: the shelf stays hidden while Documents is off', async () => {
|
||||
|
||||
@@ -9,6 +9,7 @@ import { buildSettings } from '../../../helpers/factories';
|
||||
import { useSettingsStore } from '../../../../src/store/settingsStore';
|
||||
import { ToastContainer } from '../../../../src/components/shared/Toast';
|
||||
import MAdminBackupPanel from '../../../../src/mobile/screens/admin/MAdminBackupPanel';
|
||||
import { mobileOptionLabels, pickMobileOption } from '../../../helpers/mobileSelect';
|
||||
|
||||
const manualBackup = { filename: 'backup-2025-01-15.zip', created_at: '2025-01-15T10:00:00Z', size: 2_048_000 };
|
||||
const autoBackup = { filename: 'auto-backup-2025-02-01.zip', created_at: '2025-02-01T02:00:00Z', size: 512_000 };
|
||||
@@ -349,14 +350,16 @@ describe('MAdminBackupPanel', () => {
|
||||
});
|
||||
|
||||
it('FE-MOB-MBKP-021: the hour picker renders 24h labels and names the server timezone', async () => {
|
||||
const user = userEvent.setup();
|
||||
server.use(autoSettingsHandler({ ...DEFAULT_AUTO, enabled: true }, 'Europe/Berlin'));
|
||||
render(<MAdminBackupPanel />);
|
||||
|
||||
expect(await screen.findByText('Run at hour')).toBeInTheDocument();
|
||||
expect(screen.getByText('Server local time (24h format), timezone Europe/Berlin')).toBeInTheDocument();
|
||||
expect(screen.getByRole('combobox')).toHaveValue('2');
|
||||
expect(screen.getByRole('option', { name: '00:00' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('option', { name: '23:00' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('combobox', { name: 'Run at hour' })).toHaveTextContent('02:00');
|
||||
const labels = await mobileOptionLabels(user, 'Run at hour');
|
||||
expect(labels).toContain('00:00');
|
||||
expect(labels).toContain('23:00');
|
||||
});
|
||||
|
||||
it('FE-MOB-MBKP-022: with a 12h user preference the hours are labelled AM/PM', async () => {
|
||||
@@ -365,9 +368,10 @@ describe('MAdminBackupPanel', () => {
|
||||
render(<MAdminBackupPanel />);
|
||||
|
||||
expect(await screen.findByText('Server local time (12h format)')).toBeInTheDocument();
|
||||
expect(screen.getByRole('option', { name: '12:00 AM' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('option', { name: '11:00 AM' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('option', { name: '1:00 PM' })).toBeInTheDocument();
|
||||
const labels = await mobileOptionLabels(userEvent.setup(), 'Run at hour');
|
||||
expect(labels).toContain('12:00 AM');
|
||||
expect(labels).toContain('11:00 AM');
|
||||
expect(labels).toContain('1:00 PM');
|
||||
});
|
||||
|
||||
it('FE-MOB-MBKP-023: hourly hides the hour picker, weekly shows weekdays, monthly a day select', async () => {
|
||||
@@ -388,12 +392,10 @@ describe('MAdminBackupPanel', () => {
|
||||
expect(screen.queryByText('Day of week')).not.toBeInTheDocument();
|
||||
expect(screen.getByText('Day of month')).toBeInTheDocument();
|
||||
// Hour picker plus the 1–28 day picker
|
||||
const selects = screen.getAllByRole('combobox');
|
||||
expect(selects).toHaveLength(2);
|
||||
expect(within(selects[1]).getAllByRole('option')).toHaveLength(28);
|
||||
|
||||
fireEvent.change(selects[1], { target: { value: '15' } });
|
||||
expect(selects[1]).toHaveValue('15');
|
||||
expect(screen.getAllByRole('combobox')).toHaveLength(2);
|
||||
expect(await mobileOptionLabels(user, 'Day of month')).toHaveLength(28);
|
||||
await user.click(within(screen.getByRole('dialog', { name: 'Day of month' })).getByRole('button', { name: '15' }));
|
||||
expect(screen.getByRole('combobox', { name: 'Day of month' })).toHaveTextContent('15');
|
||||
});
|
||||
|
||||
it('FE-MOB-MBKP-024: saving sends the edited schedule and confirms with a toast', async () => {
|
||||
@@ -412,7 +414,7 @@ describe('MAdminBackupPanel', () => {
|
||||
await user.click(screen.getByText('Weekly'));
|
||||
await user.click(screen.getByText('Fri'));
|
||||
await user.click(screen.getByText('30 days'));
|
||||
fireEvent.change(screen.getByRole('combobox'), { target: { value: '5' } });
|
||||
await pickMobileOption(user, 'Run at hour', '05:00');
|
||||
await user.click(screen.getByRole('button', { name: 'Save' }));
|
||||
|
||||
expect(await screen.findByText('Auto-backup settings saved')).toBeInTheDocument();
|
||||
|
||||
@@ -9,6 +9,7 @@ import { resetAllStores } from '../../../helpers/store';
|
||||
import { usePermissionsStore } from '../../../../src/store/permissionsStore';
|
||||
import { ToastContainer } from '../../../../src/components/shared/Toast';
|
||||
import MAdminPermissionsPanel from '../../../../src/mobile/screens/admin/MAdminPermissionsPanel';
|
||||
import { mobileOptionLabels, pickMobileOption } from '../../../helpers/mobileSelect';
|
||||
|
||||
const ALLOWED = ['admin', 'trip_owner', 'trip_member', 'everybody'];
|
||||
|
||||
@@ -76,12 +77,12 @@ describe('MAdminPermissionsPanel', () => {
|
||||
});
|
||||
|
||||
it('FE-MOB-APERM-003: a select reflects the stored level and offers every allowed level', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPanel();
|
||||
|
||||
await screen.findByText('Permission Settings');
|
||||
const select = screen.getByRole('combobox', { name: 'Create trips' }) as HTMLSelectElement;
|
||||
expect(select.value).toBe('trip_member');
|
||||
expect(Array.from(select.options).map((o) => o.textContent)).toEqual([
|
||||
expect(screen.getByRole('combobox', { name: 'Create trips' })).toHaveTextContent('Trip members');
|
||||
expect(await mobileOptionLabels(user, 'Create trips')).toEqual([
|
||||
'Admin only', 'Trip owner', 'Trip members', 'Everyone',
|
||||
]);
|
||||
});
|
||||
@@ -125,7 +126,7 @@ describe('MAdminPermissionsPanel', () => {
|
||||
const save = screen.getByRole('button', { name: /Save/ });
|
||||
expect(save).toBeDisabled();
|
||||
|
||||
await user.selectOptions(screen.getByRole('combobox', { name: 'Create trips' }), 'admin');
|
||||
await pickMobileOption(user, 'Create trips', 'Admin only');
|
||||
|
||||
expect(save).not.toBeDisabled();
|
||||
expect(screen.getAllByText('customized')).toHaveLength(1);
|
||||
@@ -151,8 +152,8 @@ describe('MAdminPermissionsPanel', () => {
|
||||
await user.click(screen.getByRole('button', { name: 'Reset to defaults' }));
|
||||
|
||||
await waitFor(() => expect(screen.queryByText('customized')).not.toBeInTheDocument());
|
||||
expect((screen.getByRole('combobox', { name: 'Create trips' }) as HTMLSelectElement).value).toBe('trip_member');
|
||||
expect((screen.getByRole('combobox', { name: 'Edit trip details' }) as HTMLSelectElement).value).toBe('trip_owner');
|
||||
expect(screen.getByRole('combobox', { name: 'Create trips' })).toHaveTextContent('Trip members');
|
||||
expect(screen.getByRole('combobox', { name: 'Edit trip details' })).toHaveTextContent('Trip owner');
|
||||
expect(screen.getByRole('button', { name: /Save/ })).not.toBeDisabled();
|
||||
});
|
||||
|
||||
@@ -168,7 +169,7 @@ describe('MAdminPermissionsPanel', () => {
|
||||
renderPanel();
|
||||
|
||||
await screen.findByText('Permission Settings');
|
||||
await user.selectOptions(screen.getByRole('combobox', { name: 'Create trips' }), 'admin');
|
||||
await pickMobileOption(user, 'Create trips', 'Admin only');
|
||||
await user.click(screen.getByRole('button', { name: /Save/ }));
|
||||
|
||||
await screen.findByText('Permission settings saved');
|
||||
@@ -184,7 +185,7 @@ describe('MAdminPermissionsPanel', () => {
|
||||
renderPanel();
|
||||
|
||||
await screen.findByText('Permission Settings');
|
||||
await user.selectOptions(screen.getByRole('combobox', { name: 'Create trips' }), 'admin');
|
||||
await pickMobileOption(user, 'Create trips', 'Admin only');
|
||||
await user.click(screen.getByRole('button', { name: /Save/ }));
|
||||
|
||||
await screen.findByText('Permission settings saved');
|
||||
@@ -199,7 +200,7 @@ describe('MAdminPermissionsPanel', () => {
|
||||
renderPanel();
|
||||
|
||||
await screen.findByText('Permission Settings');
|
||||
await user.selectOptions(screen.getByRole('combobox', { name: 'Create trips' }), 'admin');
|
||||
await pickMobileOption(user, 'Create trips', 'Admin only');
|
||||
const save = screen.getByRole('button', { name: /Save/ });
|
||||
await user.click(save);
|
||||
|
||||
|
||||
@@ -1695,13 +1695,14 @@ describe('MAdminPluginsPanel — instance settings', () => {
|
||||
await openRowSheet(plugin({ instanceSettingsCount: 3 }));
|
||||
fireEvent.click(screen.getByText('Instance settings'));
|
||||
|
||||
const select = await screen.findByRole('combobox', {}, { timeout: 5000 });
|
||||
expect(select).toHaveValue('slow');
|
||||
const select = await screen.findByRole('combobox', { name: 'Mode' }, { timeout: 5000 });
|
||||
expect(select).toHaveTextContent('Slow');
|
||||
expect(screen.getByRole('switch', { name: 'enabled' })).toBeInTheDocument(); // label falls back to the key
|
||||
expect(screen.getByRole('spinbutton')).toHaveValue(null);
|
||||
expect(screen.getByText('Pick one')).toBeInTheDocument(); // hint
|
||||
|
||||
fireEvent.change(select, { target: { value: 'fast' } });
|
||||
fireEvent.click(select);
|
||||
fireEvent.click(within(await screen.findByRole('dialog', { name: 'Mode' })).getByRole('button', { name: 'Fast' }));
|
||||
fireEvent.click(screen.getByRole('switch', { name: 'enabled' }));
|
||||
fireEvent.change(screen.getByRole('spinbutton'), { target: { value: '3' } });
|
||||
fireEvent.click(screen.getByRole('button', { name: /^save$/i }));
|
||||
|
||||
@@ -10,9 +10,27 @@ import { buildAdminHook, type AdminHook } from '../../../helpers/mobileAdmin';
|
||||
import { useTranslation } from '../../../../src/i18n';
|
||||
import MAdminSettingsSection from '../../../../src/mobile/screens/admin/MAdminSettingsSection';
|
||||
|
||||
const PARTS = ['security', 'services', 'features'] as const;
|
||||
|
||||
/** All three sections at once, so each card's behaviour is tested wherever it now lives. */
|
||||
function AllParts({ admin, t }: { admin: AdminHook; t: ReturnType<typeof useTranslation>['t'] }) {
|
||||
return (
|
||||
<>
|
||||
{PARTS.map((part) => (
|
||||
<MAdminSettingsSection key={part} admin={admin} t={t} part={part} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function Harness({ admin }: { admin: AdminHook }) {
|
||||
const { t } = useTranslation();
|
||||
return <MAdminSettingsSection admin={admin} t={t} />;
|
||||
return <AllParts admin={admin} t={t} />;
|
||||
}
|
||||
|
||||
function PartHarness({ admin, part }: { admin: AdminHook; part: (typeof PARTS)[number] }) {
|
||||
const { t } = useTranslation();
|
||||
return <MAdminSettingsSection admin={admin} t={t} part={part} />;
|
||||
}
|
||||
|
||||
type Spy = ReturnType<typeof vi.fn>;
|
||||
@@ -52,7 +70,7 @@ function OidcHarness() {
|
||||
discovery_url: '',
|
||||
});
|
||||
const admin = buildAdminHook({ oidcConfig, setOidcConfig });
|
||||
return <MAdminSettingsSection admin={admin} t={t} />;
|
||||
return <AllParts admin={admin} t={t} />;
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -69,7 +87,7 @@ describe('MAdminSettingsSection', () => {
|
||||
|
||||
expect(screen.getByText('Authentication Methods')).toBeInTheDocument();
|
||||
expect(screen.getByText('Passkey login')).toBeInTheDocument();
|
||||
expect(screen.getByText('Require two-factor authentication (2FA)')).toBeInTheDocument();
|
||||
expect(screen.getByText('Require 2FA')).toBeInTheDocument();
|
||||
// Card head and field label share the copy
|
||||
expect(screen.getAllByText('Allowed File Types')).toHaveLength(2);
|
||||
expect(screen.getByText('API Keys')).toBeInTheDocument();
|
||||
@@ -77,6 +95,33 @@ describe('MAdminSettingsSection', () => {
|
||||
expect(screen.getByText('Danger Zone')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-ASET-025: each section holds the cards of its desktop tab', () => {
|
||||
const admin = buildAdminHook();
|
||||
const { unmount } = render(<PartHarness admin={admin} part="security" />);
|
||||
expect(screen.getByText('Authentication Methods')).toBeInTheDocument();
|
||||
expect(screen.getByText('Danger Zone')).toBeInTheDocument();
|
||||
expect(screen.queryByText('API Keys')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('Live flight status')).not.toBeInTheDocument();
|
||||
unmount();
|
||||
|
||||
const services = render(<PartHarness admin={admin} part="services" />);
|
||||
expect(screen.getByText('API Keys')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('Allowed File Types').length).toBeGreaterThan(0);
|
||||
expect(screen.queryByText('Authentication Methods')).not.toBeInTheDocument();
|
||||
services.unmount();
|
||||
|
||||
render(<PartHarness admin={admin} part="features" />);
|
||||
expect(screen.getByText('Live flight status')).toBeInTheDocument();
|
||||
expect(screen.queryByText('API Keys')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('Danger Zone')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-ASET-026: a managed install keeps the danger zone and the passkey domain to its operator', () => {
|
||||
renderSettings({ managed: true });
|
||||
expect(screen.queryByText('Danger Zone')).not.toBeInTheDocument();
|
||||
expect(screen.getByRole('switch', { name: 'Require 2FA' })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('FE-MOB-ASET-002: the OIDC toggles only appear once OIDC is configured', () => {
|
||||
renderSettings({ oidcConfigured: false });
|
||||
|
||||
@@ -140,7 +185,7 @@ describe('MAdminSettingsSection', () => {
|
||||
const user = userEvent.setup();
|
||||
const admin = renderSettings({ requireMfa: false });
|
||||
|
||||
await user.click(toggle('Require two-factor authentication (2FA)'));
|
||||
await user.click(toggle('Require 2FA'));
|
||||
|
||||
expect(admin.handleToggleRequireMfa).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
@@ -7,6 +7,7 @@ import { resetAllStores } from '../../../helpers/store';
|
||||
import { buildAdminHook, buildAdminUser, type AdminHook } from '../../../helpers/mobileAdmin';
|
||||
import { useTranslation } from '../../../../src/i18n';
|
||||
import MAdminUsersSection from '../../../../src/mobile/screens/admin/MAdminUsersSection';
|
||||
import { mobileOptionLabels, pickMobileOption } from '../../../helpers/mobileSelect';
|
||||
|
||||
// The permissions matrix self-loads and has its own suite — stub it out here.
|
||||
vi.mock('../../../../src/mobile/screens/admin/MAdminPermissionsPanel', () => ({
|
||||
@@ -232,15 +233,15 @@ describe('MAdminUsersSection', () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
const select = screen.getByRole('combobox') as HTMLSelectElement;
|
||||
expect(screen.getByRole('option', { name: 'No trip' })).toBeInTheDocument();
|
||||
expect(select.value).toBe('');
|
||||
const select = screen.getByRole('combobox');
|
||||
const name = select.getAttribute('aria-label') ?? '';
|
||||
expect(select).toHaveTextContent('No trip');
|
||||
expect(await mobileOptionLabels(user, name)).toEqual(['No trip', 'Japan 2026']);
|
||||
await user.click(within(screen.getByRole('dialog', { name })).getByRole('button', { name: 'Japan 2026' }));
|
||||
expect(screen.getByRole('combobox')).toHaveTextContent('Japan 2026');
|
||||
|
||||
fireEvent.change(select, { target: { value: '4' } });
|
||||
expect((screen.getByRole('combobox') as HTMLSelectElement).value).toBe('4');
|
||||
|
||||
fireEvent.change(select, { target: { value: '' } });
|
||||
expect((screen.getByRole('combobox') as HTMLSelectElement).value).toBe('');
|
||||
await pickMobileOption(user, name, 'No trip');
|
||||
expect(screen.getByRole('combobox')).toHaveTextContent('No trip');
|
||||
|
||||
await user.click(screen.getByRole('button', { name: 'Create & Copy' }));
|
||||
expect(handleCreateInvite).toHaveBeenCalled();
|
||||
|
||||
@@ -132,12 +132,11 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'تم حذف رابط الدعوة',
|
||||
'admin.invite.createError': 'فشل إنشاء رابط الدعوة',
|
||||
'admin.invite.deleteError': 'فشل حذف رابط الدعوة',
|
||||
'admin.tabs.settings': 'الإعدادات',
|
||||
'admin.tabs.security': 'الأمان',
|
||||
'admin.tabs.services': 'الخدمات',
|
||||
'admin.allowRegistration': 'السماح بالتسجيل',
|
||||
'admin.allowRegistrationHint': 'يمكن للمستخدمين الجدد التسجيل بأنفسهم',
|
||||
'admin.requireMfa': 'فرض المصادقة الثنائية (2FA)',
|
||||
'admin.requireMfa': 'فرض 2FA',
|
||||
'admin.requireMfaHint': 'يجب على المستخدمين الذين لا يملكون 2FA إكمال الإعداد في الإعدادات قبل استخدام التطبيق.',
|
||||
'admin.apiKeys': 'مفاتيح API',
|
||||
'admin.apiKeysHint': 'من أين تأتي بيانات الأماكن. فهرس TREK لا يحتاج مفتاحًا؛ والمزوّدان أدناه اختياريان.',
|
||||
|
||||
@@ -131,7 +131,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Dəvət keçidi silindi',
|
||||
'admin.invite.createError': 'Dəvət keçidi yaratmaq mümkün olmadı',
|
||||
'admin.invite.deleteError': 'Dəvət keçidini silmək mümkün olmadı',
|
||||
'admin.tabs.settings': 'Tənzimləmələr',
|
||||
'admin.tabs.security': 'Təhlükəsizlik',
|
||||
'admin.tabs.services': 'Xidmətlər',
|
||||
'admin.allowRegistration': 'Qeydiyyata icazə ver',
|
||||
@@ -151,7 +150,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Parolla giriş tənzimləmələri OIDC_ONLY mühit dəyişəni ilə idarə olunur və burada dəyişdirilə bilməz.',
|
||||
'admin.lockoutWarning': 'Ən azı bir giriş üsulu aktiv qalmalıdır',
|
||||
'admin.requireMfa': 'İki faktorlu doğrulamanı (2FA) tələb et',
|
||||
'admin.requireMfa': '2FA tələb et',
|
||||
'admin.requireMfaHint':
|
||||
'2FA-sı olmayan istifadəçilər tətbiqdən istifadə etməzdən əvvəl Tənzimləmələr bölməsində quraşdırmanı tamamlamalıdırlar.',
|
||||
'admin.apiKeys': 'API açarları',
|
||||
|
||||
@@ -75,7 +75,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Link de convite excluído',
|
||||
'admin.invite.createError': 'Falha ao criar link de convite',
|
||||
'admin.invite.deleteError': 'Falha ao excluir link de convite',
|
||||
'admin.tabs.settings': 'Configurações',
|
||||
'admin.tabs.security': 'Segurança',
|
||||
'admin.tabs.services': 'Serviços',
|
||||
'admin.allowRegistration': 'Permitir cadastro',
|
||||
@@ -95,7 +94,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'As configurações de login com senha são controladas pela variável de ambiente OIDC_ONLY e não podem ser alteradas aqui.',
|
||||
'admin.lockoutWarning': 'Pelo menos um método de login deve permanecer ativado',
|
||||
'admin.requireMfa': 'Exigir autenticação em dois fatores (2FA)',
|
||||
'admin.requireMfa': 'Exigir 2FA',
|
||||
'admin.requireMfaHint': 'Usuários sem 2FA precisam concluir a configuração em Configurações antes de usar o app.',
|
||||
'admin.apiKeys': 'Chaves de API',
|
||||
'admin.apiKeysHint':
|
||||
|
||||
@@ -81,7 +81,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Enllaç de convidada eliminat',
|
||||
'admin.invite.createError': "Error en crear l'enllaç",
|
||||
'admin.invite.deleteError': "Error en eliminar l'enllaç",
|
||||
'admin.tabs.settings': 'Configuració',
|
||||
'admin.tabs.security': 'Seguretat',
|
||||
'admin.tabs.services': 'Serveis',
|
||||
'admin.allowRegistration': 'Permetre el registre',
|
||||
@@ -101,7 +100,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
"La configuració d'inici de sessió amb contrasenya està controlada per la variable d'entorn OIDC_ONLY i no es pot canviar aquí.",
|
||||
'admin.lockoutWarning': "Almenys un mètode d'inici de sessió ha de romandre activat",
|
||||
'admin.requireMfa': 'Exigir autenticació de dos factors (2FA)',
|
||||
'admin.requireMfa': 'Exigir 2FA',
|
||||
'admin.requireMfaHint':
|
||||
"Els usuaris sense 2FA han de completar la configuració a Ajustos abans d'utilitzar l'aplicació.",
|
||||
'admin.apiKeys': 'Claus API',
|
||||
|
||||
@@ -79,7 +79,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Pozvánka smazána',
|
||||
'admin.invite.createError': 'Nepodařilo se vytvořit pozvánku',
|
||||
'admin.invite.deleteError': 'Nepodařilo se smazat pozvánku',
|
||||
'admin.tabs.settings': 'Nastavení',
|
||||
'admin.tabs.security': 'Zabezpečení',
|
||||
'admin.tabs.services': 'Služby',
|
||||
'admin.allowRegistration': 'Povolit registraci',
|
||||
@@ -98,7 +97,7 @@ const admin: TranslationStrings = {
|
||||
'Když je přihlášení heslem vypnuté, návštěvníci jsou hned přesměrováni k poskytovateli identity. Vypněte to, aby se nejdřív zobrazila přihlašovací stránka s tlačítkem SSO.',
|
||||
'admin.envOverrideHint': 'Nastavení přihlášení heslem řídí proměnná prostředí OIDC_ONLY a nelze je zde změnit.',
|
||||
'admin.lockoutWarning': 'Alespoň jedna metoda přihlášení musí zůstat povolená',
|
||||
'admin.requireMfa': 'Vyžadovat dvoufázové ověření (2FA)',
|
||||
'admin.requireMfa': 'Vyžadovat 2FA',
|
||||
'admin.requireMfaHint': 'Uživatelé bez 2FA musí dokončit nastavení v Nastavení před použitím aplikace.',
|
||||
'admin.apiKeys': 'API klíče',
|
||||
'admin.apiKeysHint': 'Odkud pocházejí data míst. Index TREK nepotřebuje klíč; dva poskytovatelé níže jsou volitelní.',
|
||||
|
||||
@@ -76,7 +76,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Einladungslink gelöscht',
|
||||
'admin.invite.createError': 'Fehler beim Erstellen des Einladungslinks',
|
||||
'admin.invite.deleteError': 'Fehler beim Löschen des Einladungslinks',
|
||||
'admin.tabs.settings': 'Einstellungen',
|
||||
'admin.tabs.security': 'Sicherheit',
|
||||
'admin.tabs.services': 'Dienste',
|
||||
'admin.allowRegistration': 'Registrierung erlauben',
|
||||
@@ -96,7 +95,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Die Einstellungen zur Passwort-Anmeldung werden über die Umgebungsvariable OIDC_ONLY gesteuert und lassen sich hier nicht ändern.',
|
||||
'admin.lockoutWarning': 'Mindestens eine Anmeldemethode muss aktiviert bleiben',
|
||||
'admin.requireMfa': 'Zwei-Faktor-Authentifizierung (2FA) für alle verlangen',
|
||||
'admin.requireMfa': '2FA verlangen',
|
||||
'admin.requireMfaHint':
|
||||
'Benutzer ohne 2FA müssen die Einrichtung unter Einstellungen abschließen, bevor sie die App nutzen können.',
|
||||
'admin.apiKeys': 'API-Schlüssel',
|
||||
|
||||
@@ -127,7 +127,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Invite link deleted',
|
||||
'admin.invite.createError': 'Failed to create invite link',
|
||||
'admin.invite.deleteError': 'Failed to delete invite link',
|
||||
'admin.tabs.settings': 'Settings',
|
||||
'admin.tabs.security': 'Security',
|
||||
'admin.tabs.services': 'Services',
|
||||
'admin.allowRegistration': 'Allow Registration',
|
||||
@@ -147,7 +146,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Password login settings are controlled by the OIDC_ONLY environment variable and cannot be changed here.',
|
||||
'admin.lockoutWarning': 'At least one login method must remain enabled',
|
||||
'admin.requireMfa': 'Require two-factor authentication (2FA)',
|
||||
'admin.requireMfa': 'Require 2FA',
|
||||
'admin.requireMfaHint': 'Users without 2FA must complete setup in Settings before using the app.',
|
||||
'admin.apiKeys': 'API Keys',
|
||||
'admin.apiKeysHint':
|
||||
|
||||
@@ -76,7 +76,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Enlace de invitación eliminado',
|
||||
'admin.invite.createError': 'Error al crear el enlace',
|
||||
'admin.invite.deleteError': 'Error al eliminar el enlace',
|
||||
'admin.tabs.settings': 'Ajustes',
|
||||
'admin.tabs.security': 'Seguridad',
|
||||
'admin.tabs.services': 'Servicios',
|
||||
'admin.allowRegistration': 'Permitir el registro',
|
||||
@@ -96,7 +95,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Los ajustes del inicio de sesión con contraseña se controlan con la variable de entorno OIDC_ONLY y no se pueden cambiar aquí.',
|
||||
'admin.lockoutWarning': 'Debe quedar activado al menos un método de inicio de sesión',
|
||||
'admin.requireMfa': 'Exigir autenticación en dos factores (2FA)',
|
||||
'admin.requireMfa': 'Exigir 2FA',
|
||||
'admin.requireMfaHint':
|
||||
'Los usuarios sin 2FA deben completar la configuración en Ajustes antes de usar la aplicación.',
|
||||
'admin.apiKeys': 'Claves API',
|
||||
|
||||
@@ -129,7 +129,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Kutselink kustutatud',
|
||||
'admin.invite.createError': 'Kutselingi loomine ebaõnnestus',
|
||||
'admin.invite.deleteError': 'Kutselingi kustutamine ebaõnnestus',
|
||||
'admin.tabs.settings': 'Seaded',
|
||||
'admin.tabs.security': 'Turvalisus',
|
||||
'admin.tabs.services': 'Teenused',
|
||||
'admin.allowRegistration': 'Luba registreerumine',
|
||||
@@ -149,7 +148,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Parooliga sisselogimise seadeid juhib keskkonnamuutuja OIDC_ONLY ja neid ei saa siin muuta.',
|
||||
'admin.lockoutWarning': 'Vähemalt üks sisselogimisviis peab jääma lubatuks',
|
||||
'admin.requireMfa': 'Nõua kaheastmelist autentimist (2FA)',
|
||||
'admin.requireMfa': 'Nõua 2FA-d',
|
||||
'admin.requireMfaHint': 'Ilma 2FA-ta kasutajad peavad enne rakenduse kasutamist selle seadetes seadistama.',
|
||||
'admin.apiKeys': 'API-võtmed',
|
||||
'admin.apiKeysHint':
|
||||
|
||||
@@ -75,7 +75,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': "Lien d'invitation supprimé",
|
||||
'admin.invite.createError': 'Erreur lors de la création du lien',
|
||||
'admin.invite.deleteError': 'Erreur lors de la suppression du lien',
|
||||
'admin.tabs.settings': 'Paramètres',
|
||||
'admin.tabs.security': 'Sécurité',
|
||||
'admin.tabs.services': 'Services', // same-as-en
|
||||
'admin.allowRegistration': 'Autoriser les inscriptions',
|
||||
@@ -96,7 +95,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
"Les réglages de connexion par mot de passe sont contrôlés par la variable d'environnement OIDC_ONLY et ne peuvent pas être modifiés ici.",
|
||||
'admin.lockoutWarning': 'Au moins une méthode de connexion doit rester activée',
|
||||
'admin.requireMfa': "Exiger l'authentification à deux facteurs (2FA)",
|
||||
'admin.requireMfa': 'Exiger la 2FA',
|
||||
'admin.requireMfaHint':
|
||||
"Les utilisateurs sans 2FA doivent terminer la configuration dans Paramètres avant d'utiliser l'application.",
|
||||
'admin.apiKeys': 'Clés API',
|
||||
|
||||
@@ -131,7 +131,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Ο σύνδεσμος πρόσκλησης διαγράφηκε',
|
||||
'admin.invite.createError': 'Αποτυχία δημιουργίας συνδέσμου πρόσκλησης',
|
||||
'admin.invite.deleteError': 'Αποτυχία διαγραφής συνδέσμου πρόσκλησης',
|
||||
'admin.tabs.settings': 'Ρυθμίσεις',
|
||||
'admin.tabs.security': 'Ασφάλεια',
|
||||
'admin.tabs.services': 'Υπηρεσίες',
|
||||
'admin.allowRegistration': 'Να επιτρέπονται οι εγγραφές',
|
||||
@@ -151,7 +150,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Οι ρυθμίσεις σύνδεσης με κωδικό ελέγχονται από τη μεταβλητή περιβάλλοντος OIDC_ONLY και δεν μπορούν να αλλάξουν εδώ.',
|
||||
'admin.lockoutWarning': 'Πρέπει να παραμείνει ενεργοποιημένη τουλάχιστον μία μέθοδος σύνδεσης',
|
||||
'admin.requireMfa': 'Απαίτηση ελέγχου ταυτότητας δύο παραγόντων (2FA)',
|
||||
'admin.requireMfa': 'Απαίτηση 2FA',
|
||||
'admin.requireMfaHint':
|
||||
'Οι χρήστες χωρίς 2FA πρέπει να ολοκληρώσουν τη ρύθμιση στις Ρυθμίσεις πριν χρησιμοποιήσουν την εφαρμογή.',
|
||||
'admin.apiKeys': 'Κλειδιά API',
|
||||
|
||||
@@ -129,7 +129,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'קישור ההזמנה נמחק',
|
||||
'admin.invite.createError': 'יצירת קישור ההזמנה נכשלה',
|
||||
'admin.invite.deleteError': 'מחיקת קישור ההזמנה נכשלה',
|
||||
'admin.tabs.settings': 'הגדרות',
|
||||
'admin.tabs.security': 'אבטחה',
|
||||
'admin.tabs.services': 'שירותים',
|
||||
'admin.allowRegistration': 'אפשור הרשמה',
|
||||
@@ -148,7 +147,7 @@ const admin: TranslationStrings = {
|
||||
'כשהתחברות עם סיסמה כבויה, המבקרים מועברים מיד לספק הזהות. כבו את האפשרות כדי להציג קודם את דף ההתחברות עם כפתור ה-SSO.',
|
||||
'admin.envOverrideHint': 'הגדרות ההתחברות בסיסמה נשלטות על ידי משתנה הסביבה OIDC_ONLY ולא ניתן לשנות אותן כאן.',
|
||||
'admin.lockoutWarning': 'לפחות שיטת התחברות אחת חייבת להישאר מופעלת',
|
||||
'admin.requireMfa': 'חיוב אימות דו-שלבי (2FA)',
|
||||
'admin.requireMfa': 'חיוב 2FA',
|
||||
'admin.requireMfaHint': 'משתמשים ללא 2FA יצטרכו להשלים הגדרה בהגדרות לפני שימוש באפליקציה.',
|
||||
'admin.apiKeys': 'מפתחות API',
|
||||
'admin.apiKeysHint': 'מאיפה מגיעים נתוני המקומות. אינדקס TREK לא דורש מפתח; שני הספקים למטה אופציונליים.',
|
||||
|
||||
@@ -75,7 +75,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Meghívó link törölve',
|
||||
'admin.invite.createError': 'Nem sikerült létrehozni a meghívó linket',
|
||||
'admin.invite.deleteError': 'Nem sikerült törölni a meghívó linket',
|
||||
'admin.tabs.settings': 'Beállítások',
|
||||
'admin.tabs.security': 'Biztonság',
|
||||
'admin.tabs.services': 'Szolgáltatások',
|
||||
'admin.allowRegistration': 'Regisztráció engedélyezése',
|
||||
@@ -95,7 +94,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'A jelszavas bejelentkezés beállításait az OIDC_ONLY környezeti változó vezérli, itt nem módosíthatók.',
|
||||
'admin.lockoutWarning': 'Legalább egy bejelentkezési módnak engedélyezve kell maradnia',
|
||||
'admin.requireMfa': 'Kétlépcsős hitelesítés (2FA) kötelezővé tétele',
|
||||
'admin.requireMfa': '2FA kötelezővé tétele',
|
||||
'admin.requireMfaHint':
|
||||
'A 2FA nélküli felhasználóknak a Beállításokban kell befejezniük a beállítást az alkalmazás használata előtt.',
|
||||
'admin.apiKeys': 'API kulcsok',
|
||||
|
||||
@@ -123,7 +123,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Tautan undangan dihapus',
|
||||
'admin.invite.createError': 'Gagal membuat tautan undangan',
|
||||
'admin.invite.deleteError': 'Gagal menghapus tautan undangan',
|
||||
'admin.tabs.settings': 'Pengaturan',
|
||||
'admin.tabs.security': 'Keamanan',
|
||||
'admin.tabs.services': 'Layanan',
|
||||
'admin.allowRegistration': 'Izinkan Pendaftaran',
|
||||
@@ -143,7 +142,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Pengaturan login kata sandi dikendalikan oleh variabel lingkungan OIDC_ONLY dan tidak dapat diubah di sini.',
|
||||
'admin.lockoutWarning': 'Minimal satu metode login harus tetap aktif',
|
||||
'admin.requireMfa': 'Wajibkan autentikasi dua faktor (2FA)',
|
||||
'admin.requireMfa': 'Wajibkan 2FA',
|
||||
'admin.requireMfaHint':
|
||||
'Pengguna tanpa 2FA harus menyelesaikan pengaturan di Pengaturan sebelum menggunakan aplikasi.',
|
||||
'admin.apiKeys': 'Kunci API',
|
||||
|
||||
@@ -75,7 +75,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Link di invito eliminato',
|
||||
'admin.invite.createError': 'Impossibile creare il link di invito',
|
||||
'admin.invite.deleteError': 'Impossibile eliminare il link di invito',
|
||||
'admin.tabs.settings': 'Impostazioni',
|
||||
'admin.tabs.security': 'Sicurezza',
|
||||
'admin.tabs.services': 'Servizi',
|
||||
'admin.allowRegistration': 'Consenti Registrazione',
|
||||
@@ -95,7 +94,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
"Le impostazioni di accesso con password sono controllate dalla variabile d'ambiente OIDC_ONLY e non possono essere modificate qui.",
|
||||
'admin.lockoutWarning': 'Deve restare attivo almeno un metodo di accesso',
|
||||
'admin.requireMfa': 'Richiedi autenticazione a due fattori (2FA)',
|
||||
'admin.requireMfa': 'Richiedi 2FA',
|
||||
'admin.requireMfaHint':
|
||||
"Gli utenti senza 2FA devono completare la configurazione in Impostazioni prima di usare l'app.",
|
||||
'admin.apiKeys': 'Chiavi API',
|
||||
|
||||
@@ -117,7 +117,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': '招待リンクを削除しました',
|
||||
'admin.invite.createError': '招待リンクの作成に失敗しました',
|
||||
'admin.invite.deleteError': '招待リンクの削除に失敗しました',
|
||||
'admin.tabs.settings': '設定',
|
||||
'admin.tabs.security': 'セキュリティ',
|
||||
'admin.tabs.services': 'サービス',
|
||||
'admin.allowRegistration': '登録を許可',
|
||||
@@ -136,7 +135,7 @@ const admin: TranslationStrings = {
|
||||
'パスワードログインがオフのとき、訪問者はすぐに ID プロバイダーへ移動します。オフにすると、先に SSO ボタン付きのログインページを表示します。',
|
||||
'admin.envOverrideHint': 'パスワードログイン設定は OIDC_ONLY 環境変数で制御されています。',
|
||||
'admin.lockoutWarning': '少なくとも1つのログイン方法を有効にしてください',
|
||||
'admin.requireMfa': '二要素認証(2FA)を必須にする',
|
||||
'admin.requireMfa': '2FAを必須にする',
|
||||
'admin.requireMfaHint': '2FA未設定のユーザーは、利用前に設定が必要です。',
|
||||
'admin.apiKeys': 'APIキー',
|
||||
'admin.apiKeysHint': '場所データの出どころ。TREK のインデックスにキーは不要で、下の二つの提供元は任意です。',
|
||||
|
||||
@@ -122,7 +122,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': '초대 링크가 삭제되었습니다',
|
||||
'admin.invite.createError': '초대 링크 생성 실패',
|
||||
'admin.invite.deleteError': '초대 링크 삭제 실패',
|
||||
'admin.tabs.settings': '설정',
|
||||
'admin.tabs.security': '보안',
|
||||
'admin.tabs.services': '서비스',
|
||||
'admin.allowRegistration': '회원가입 허용',
|
||||
@@ -141,7 +140,7 @@ const admin: TranslationStrings = {
|
||||
'비밀번호 로그인이 꺼져 있으면 방문자는 바로 ID 공급자로 이동합니다. 끄면 SSO 버튼이 있는 로그인 페이지를 먼저 보여 줍니다.',
|
||||
'admin.envOverrideHint': '비밀번호 로그인 설정은 OIDC_ONLY 환경 변수로 제어되며 여기서 변경할 수 없습니다.',
|
||||
'admin.lockoutWarning': '최소 하나의 로그인 방법이 활성화되어 있어야 합니다',
|
||||
'admin.requireMfa': '2단계 인증 (2FA) 요구',
|
||||
'admin.requireMfa': '2FA 요구',
|
||||
'admin.requireMfaHint': '2FA가 없는 사용자는 앱을 사용하기 전에 설정에서 설정을 완료해야 합니다.',
|
||||
'admin.apiKeys': 'API 키',
|
||||
'admin.apiKeysHint': '장소 데이터의 출처. TREK 색인에는 키가 필요 없으며, 아래 두 제공자는 선택 사항입니다.',
|
||||
|
||||
@@ -76,7 +76,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Uitnodigingslink verwijderd',
|
||||
'admin.invite.createError': 'Fout bij aanmaken van link',
|
||||
'admin.invite.deleteError': 'Fout bij verwijderen van link',
|
||||
'admin.tabs.settings': 'Instellingen',
|
||||
'admin.tabs.security': 'Beveiliging',
|
||||
'admin.tabs.services': 'Diensten',
|
||||
'admin.allowRegistration': 'Registratie toestaan',
|
||||
@@ -96,7 +95,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'De instellingen voor inloggen met wachtwoord worden beheerd via de omgevingsvariabele OIDC_ONLY en kunnen hier niet worden gewijzigd.',
|
||||
'admin.lockoutWarning': 'Er moet minstens één inlogmethode ingeschakeld blijven',
|
||||
'admin.requireMfa': 'Tweestapsverificatie (2FA) verplichten',
|
||||
'admin.requireMfa': '2FA verplichten',
|
||||
'admin.requireMfaHint':
|
||||
'Gebruikers zonder 2FA moeten de installatie in Instellingen voltooien voordat ze de app kunnen gebruiken.',
|
||||
'admin.apiKeys': 'API-sleutels',
|
||||
|
||||
@@ -72,7 +72,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Link zaproszenia został usunięty',
|
||||
'admin.invite.createError': 'Nie udało się utworzyć linku zaproszenia',
|
||||
'admin.invite.deleteError': 'Nie udało się usunąć linku zaproszenia',
|
||||
'admin.tabs.settings': 'Ustawienia',
|
||||
'admin.tabs.security': 'Bezpieczeństwo',
|
||||
'admin.tabs.services': 'Usługi',
|
||||
'admin.allowRegistration': 'Zezwól na rejestrację',
|
||||
@@ -92,7 +91,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Ustawienia logowania hasłem są kontrolowane przez zmienną środowiskową OIDC_ONLY i nie można ich tu zmienić.',
|
||||
'admin.lockoutWarning': 'Co najmniej jedna metoda logowania musi pozostać włączona',
|
||||
'admin.requireMfa': 'Wymagaj uwierzytelniania dwuskładnikowego (2FA)',
|
||||
'admin.requireMfa': 'Wymagaj 2FA',
|
||||
'admin.requireMfaHint':
|
||||
'Użytkownicy bez 2FA muszą ukończyć konfigurację w Ustawieniach zanim zaczną korzystać z aplikacji.',
|
||||
'admin.apiKeys': 'Klucze API',
|
||||
|
||||
@@ -84,7 +84,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Ссылка-приглашение удалена',
|
||||
'admin.invite.createError': 'Ошибка при создании ссылки',
|
||||
'admin.invite.deleteError': 'Ошибка при удалении ссылки',
|
||||
'admin.tabs.settings': 'Настройки',
|
||||
'admin.tabs.security': 'Безопасность',
|
||||
'admin.tabs.services': 'Сервисы',
|
||||
'admin.allowRegistration': 'Разрешить регистрацию',
|
||||
@@ -104,7 +103,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Настройки входа по паролю управляются переменной окружения OIDC_ONLY и не могут быть изменены здесь.',
|
||||
'admin.lockoutWarning': 'Должен оставаться включённым хотя бы один способ входа',
|
||||
'admin.requireMfa': 'Требовать двухфакторную аутентификацию (2FA)',
|
||||
'admin.requireMfa': 'Требовать 2FA',
|
||||
'admin.requireMfaHint':
|
||||
'Пользователи без 2FA должны завершить настройку в разделе «Настройки» перед использованием приложения.',
|
||||
'admin.apiKeys': 'API-ключи',
|
||||
|
||||
@@ -131,7 +131,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Pozývací odkaz odstránený',
|
||||
'admin.invite.createError': 'Nepodarilo sa vytvoriť pozývací odkaz',
|
||||
'admin.invite.deleteError': 'Nepodarilo sa odstrániť pozývací odkaz',
|
||||
'admin.tabs.settings': 'Nastavenia',
|
||||
'admin.tabs.security': 'Zabezpečenie',
|
||||
'admin.tabs.services': 'Služby',
|
||||
'admin.allowRegistration': 'Povoliť registráciu',
|
||||
@@ -150,7 +149,7 @@ const admin: TranslationStrings = {
|
||||
'Keď je prihlásenie heslom vypnuté, návštevníci sú hneď presmerovaní k poskytovateľovi identity. Vypnite to, aby sa najprv zobrazila prihlasovacia stránka s tlačidlom SSO.',
|
||||
'admin.envOverrideHint': 'Nastavenia prihlásenia heslom riadi premenná prostredia OIDC_ONLY a nedajú sa tu zmeniť.',
|
||||
'admin.lockoutWarning': 'Aspoň jedna metóda prihlásenia musí zostať zapnutá',
|
||||
'admin.requireMfa': 'Vyžadovať dvojfaktorové overenie (2FA)',
|
||||
'admin.requireMfa': 'Vyžadovať 2FA',
|
||||
'admin.requireMfaHint': 'Používatelia bez 2FA musia pred použitím aplikácie dokončiť nastavenie v Nastaveniach.',
|
||||
'admin.apiKeys': 'API kľúče',
|
||||
'admin.apiKeysHint':
|
||||
|
||||
@@ -128,7 +128,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Inbjudningslänken har tagits bort',
|
||||
'admin.invite.createError': 'Det gick inte att skapa en inbjudningslänk',
|
||||
'admin.invite.deleteError': 'Det gick inte att ta bort inbjudningslänken',
|
||||
'admin.tabs.settings': 'Inställningar',
|
||||
'admin.tabs.security': 'Säkerhet',
|
||||
'admin.tabs.services': 'Tjänster',
|
||||
'admin.allowRegistration': 'Tillåt registrering',
|
||||
@@ -148,7 +147,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Inställningarna för inloggning med lösenord styrs av miljövariabeln OIDC_ONLY och kan inte ändras här.',
|
||||
'admin.lockoutWarning': 'Minst en inloggningsmetod måste vara aktiverad',
|
||||
'admin.requireMfa': 'Kräv tvåfaktorsautentisering (2FA)',
|
||||
'admin.requireMfa': 'Kräv 2FA',
|
||||
'admin.requireMfaHint':
|
||||
'Användare som inte har tvåfaktorsautentisering måste slutföra inställningarna under inställningar innan de använder appen.',
|
||||
'admin.apiKeys': 'API Nycklar',
|
||||
|
||||
@@ -123,7 +123,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'ลบลิงก์คำเชิญแล้ว',
|
||||
'admin.invite.createError': 'ไม่สามารถสร้างลิงก์คำเชิญได้',
|
||||
'admin.invite.deleteError': 'ลบลิงก์คำเชิญไม่สำเร็จ',
|
||||
'admin.tabs.settings': 'การตั้งค่า',
|
||||
'admin.tabs.security': 'ความปลอดภัย',
|
||||
'admin.tabs.services': 'บริการ',
|
||||
'admin.allowRegistration': 'อนุญาตให้ลงทะเบียน',
|
||||
@@ -143,7 +142,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'การตั้งค่าการเข้าสู่ระบบด้วยรหัสผ่านได้รับการควบคุมโดยตัวแปรสภาพแวดล้อม OIDC_ONLY และไม่สามารถเปลี่ยนแปลงได้ที่นี่',
|
||||
'admin.lockoutWarning': 'ต้องเปิดใช้งานวิธีการเข้าสู่ระบบอย่างน้อยหนึ่งวิธี',
|
||||
'admin.requireMfa': 'ต้องมีการรับรองความถูกต้องด้วยสองปัจจัย (2FA)',
|
||||
'admin.requireMfa': 'บังคับใช้ 2FA',
|
||||
'admin.requireMfaHint': 'ผู้ใช้ที่ไม่มี 2FA ต้องตั้งค่าในการตั้งค่าให้เสร็จสิ้นก่อนจึงจะใช้แอปได้',
|
||||
'admin.apiKeys': 'คีย์ API',
|
||||
'admin.apiKeysHint': 'ไม่จำเป็น เปิดใช้งานข้อมูลสถานที่แบบขยาย เช่น รูปภาพและสภาพอากาศ',
|
||||
|
||||
@@ -128,7 +128,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Davet bağlantısı silindi',
|
||||
'admin.invite.createError': 'Davet bağlantısı oluşturulamadı',
|
||||
'admin.invite.deleteError': 'Davet bağlantısı silinemedi',
|
||||
'admin.tabs.settings': 'Ayarlar',
|
||||
'admin.tabs.security': 'Güvenlik',
|
||||
'admin.tabs.services': 'Hizmetler',
|
||||
'admin.allowRegistration': 'Kayda İzin Ver',
|
||||
@@ -148,7 +147,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Şifre oturum açma ayarları OIDC_ONLY ortam değişkeni tarafından kontrol edilir ve burada değiştirilemez.',
|
||||
'admin.lockoutWarning': 'En az bir oturum açma yöntemi etkin kalmalıdır',
|
||||
'admin.requireMfa': 'İki faktörlü kimlik doğrulama (2FA) gerektir',
|
||||
'admin.requireMfa': '2FA gerektir',
|
||||
'admin.requireMfaHint':
|
||||
"2FA'sı olmayan kullanıcıların uygulamayı kullanmadan önce Ayarlar'da kurulumu tamamlaması gerekir.",
|
||||
'admin.apiKeys': 'API Anahtarları',
|
||||
|
||||
@@ -84,7 +84,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Посилання-запрошення видалено',
|
||||
'admin.invite.createError': 'Помилка створення посилання',
|
||||
'admin.invite.deleteError': 'Помилка видалення посилання',
|
||||
'admin.tabs.settings': 'Налаштування',
|
||||
'admin.tabs.security': 'Безпека',
|
||||
'admin.tabs.services': 'Сервіси',
|
||||
'admin.allowRegistration': 'Дозволити реєстрацію',
|
||||
@@ -104,7 +103,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Налаштування входу за паролем контролюються змінною середовища OIDC_ONLY і не можуть бути змінені тут.',
|
||||
'admin.lockoutWarning': 'Потрібно залишити увімкненим принаймні один метод входу',
|
||||
'admin.requireMfa': 'Вимагати двофакторну автентифікацію (2FA)',
|
||||
'admin.requireMfa': 'Вимагати 2FA',
|
||||
'admin.requireMfaHint':
|
||||
'Користувачі без 2FA повинні завершити налаштування в розділі «Налаштування» перед використанням програми.',
|
||||
'admin.apiKeys': 'API-ключі',
|
||||
|
||||
@@ -124,7 +124,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': 'Đã xóa liên kết mời',
|
||||
'admin.invite.createError': 'Không tạo được liên kết mời',
|
||||
'admin.invite.deleteError': 'Không xóa được liên kết mời',
|
||||
'admin.tabs.settings': 'Cài đặt',
|
||||
'admin.tabs.security': 'Bảo mật',
|
||||
'admin.tabs.services': 'Dịch vụ',
|
||||
'admin.allowRegistration': 'Cho phép đăng ký',
|
||||
@@ -144,7 +143,7 @@ const admin: TranslationStrings = {
|
||||
'admin.envOverrideHint':
|
||||
'Cài đặt đăng nhập mật khẩu được kiểm soát bởi biến môi trường OIDC_ONLY và không thể thay đổi tại đây.',
|
||||
'admin.lockoutWarning': 'Ít nhất một phương thức đăng nhập phải được bật',
|
||||
'admin.requireMfa': 'Yêu cầu xác thực hai yếu tố (2FA)',
|
||||
'admin.requireMfa': 'Yêu cầu 2FA',
|
||||
'admin.requireMfaHint': 'Người dùng không có 2FA phải hoàn tất thiết lập trong Cài đặt trước khi sử dụng ứng dụng.',
|
||||
'admin.apiKeys': 'API Key',
|
||||
'admin.apiKeysHint':
|
||||
|
||||
@@ -120,7 +120,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': '邀請連結已刪除',
|
||||
'admin.invite.createError': '建立連結失敗',
|
||||
'admin.invite.deleteError': '刪除連結失敗',
|
||||
'admin.tabs.settings': '設定',
|
||||
'admin.tabs.security': '安全性',
|
||||
'admin.tabs.services': '服務',
|
||||
'admin.allowRegistration': '允許註冊',
|
||||
@@ -138,7 +137,7 @@ const admin: TranslationStrings = {
|
||||
'admin.oidcAutoRedirectHint': '關閉密碼登入後,訪客會被直接帶到身分提供者。關閉此項可先顯示含有 SSO 按鈕的登入頁面。',
|
||||
'admin.envOverrideHint': '密碼登入設定由環境變數 OIDC_ONLY 控制,無法在此變更。',
|
||||
'admin.lockoutWarning': '至少須保留一種登入方式',
|
||||
'admin.requireMfa': '要求雙因素身份驗證(2FA)',
|
||||
'admin.requireMfa': '要求 2FA',
|
||||
'admin.requireMfaHint': '未啟用 2FA 的使用者必須先完成設定中的配置才能使用應用。',
|
||||
'admin.apiKeys': 'API 金鑰',
|
||||
'admin.apiKeysHint': '地點資料從哪裡來。TREK 索引不需要金鑰,下面兩個提供者是選用的。',
|
||||
|
||||
@@ -72,7 +72,6 @@ const admin: TranslationStrings = {
|
||||
'admin.invite.deleted': '邀请链接已删除',
|
||||
'admin.invite.createError': '创建链接失败',
|
||||
'admin.invite.deleteError': '删除链接失败',
|
||||
'admin.tabs.settings': '设置',
|
||||
'admin.tabs.security': '安全',
|
||||
'admin.tabs.services': '服务',
|
||||
'admin.allowRegistration': '允许注册',
|
||||
@@ -90,7 +89,7 @@ const admin: TranslationStrings = {
|
||||
'admin.oidcAutoRedirectHint': '关闭密码登录后,访客会被直接带到身份提供商。关闭此项可先显示带有 SSO 按钮的登录页。',
|
||||
'admin.envOverrideHint': '密码登录设置由 OIDC_ONLY 环境变量控制,无法在此处修改。',
|
||||
'admin.lockoutWarning': '至少需要保留一种登录方式',
|
||||
'admin.requireMfa': '要求双因素身份验证(2FA)',
|
||||
'admin.requireMfa': '要求 2FA',
|
||||
'admin.requireMfaHint': '未启用 2FA 的用户必须先完成设置中的配置才能使用应用。',
|
||||
'admin.apiKeys': 'API 密钥',
|
||||
'admin.apiKeysHint': '地点数据从哪里来。TREK 索引不需要密钥,下面两个提供方是可选的。',
|
||||
|
||||
Reference in New Issue
Block a user