ext(sw): add preview_totp_from_secret popup handler

This commit is contained in:
adlee-was-taken
2026-05-01 19:55:24 -04:00
parent ed2d299a92
commit bb8b86f0d5
3 changed files with 65 additions and 1 deletions

View File

@@ -59,7 +59,8 @@ export type PopupMessage =
newRemote: { hostType: 'gitea' | 'github'; hostUrl: string; repoPath: string; apiToken: string };
}
| { type: 'parse_lastpass_csv'; bytes: ArrayBuffer }
| { type: 'import_lastpass_commit'; items: Item[] };
| { type: 'import_lastpass_commit'; items: Item[] }
| { type: 'preview_totp_from_secret'; secret_b32: string };
// --- Messages a content script may send ---
@@ -166,6 +167,7 @@ export const POPUP_ONLY_TYPES: ReadonlySet<PopupMessage['type']> = new Set([
'get_session_config', 'update_session_config',
'export_backup', 'restore_backup',
'parse_lastpass_csv', 'import_lastpass_commit',
'preview_totp_from_secret',
] as PopupMessage['type'][]);
export interface ExportBackupResponse extends Extract<Response, { ok: true }> {