feat(modal): refactor modal types and integrate security action requirements

This commit is contained in:
2026-04-24 08:52:22 -04:00
parent 38dd017dcd
commit f82d314d80
7 changed files with 207 additions and 80 deletions
@@ -4,25 +4,18 @@
import { parseTotpEnabled } from '$lib/utils/totp';
import { tick } from 'svelte';
import { extractError } from '$lib/utils/misc';
import type { ModalItem, ModalMode } from '$lib/types/modal';
interface Props {
show?: boolean;
mode?:
| 'decrypt'
| 'encrypt'
| 'confirm'
| 'prompt'
| 'multiselect'
| 'totp'
| 'totpSetup'
| 'report';
mode?: ModalMode;
title?: string;
message?: string;
error?: string;
placeholder?: string;
inputType?: string;
inputMaxLength?: number | null;
items?: { label: string; value: unknown }[];
items?: ModalItem[];
initialValue?: unknown;
totpActive?: boolean | null;
reportTarget?: 'user' | 'paste' | null;