feat(client): fix square QR layout and add dynamic multi-auth, strictness presets, and backup UI

This commit is contained in:
tyuXX 2026-11-26 21:23:35 +00:00
parent 4915bce1e4
commit 90a8bf8553
8 changed files with 683 additions and 96 deletions

View file

@ -70,6 +70,29 @@ export interface ServerEntry {
} | null;
}
export interface ClientSecuritySettings {
requireTotpOnLogin: boolean;
passwordMode: 'any' | 'all';
totpMode: 'any' | 'all';
stepUpPolicy: 'off' | 'every-action' | '5m' | '1h' | '24h' | 'session';
stepUpMethod: 'totp' | 'password' | 'both';
elevateOnLogin: boolean;
keepElevationOnSafeMode: boolean;
enableEmergencySecretsBackup: boolean;
}
export interface ClientAuthRequirements {
requireTotpOnLogin: boolean;
passwordMode: 'any' | 'all';
passwordCount: number;
passwordLabels: Array<{ id: string; label: string }>;
totpMode: 'any' | 'all';
totpCount: number;
totpLabels: Array<{ id: string; label: string }>;
stepUpPolicy: ClientSecuritySettings['stepUpPolicy'];
stepUpMethod: ClientSecuritySettings['stepUpMethod'];
}
export interface ClientState {
bootstrapped: boolean;
authenticated: boolean;
@ -82,6 +105,8 @@ export interface ClientState {
route: RouteId;
selectedServerId?: string;
overview: ConfigOverview | null;
security?: ClientSecuritySettings;
authRequirements?: ClientAuthRequirements;
}
export const SAFE_MODE_STORAGE_KEY = 'gcoord_device_safe_mode';