From 1916fa0f81f9826c2dcfa8ad7455c1b703b893ac Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Sun, 12 Apr 2026 12:22:24 -0400 Subject: [PATCH] feat: add settings and credential capture message types Co-Authored-By: Claude Opus 4.6 (1M context) --- extension/src/shared/messages.ts | 8 +++++++- extension/src/shared/types.ts | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/extension/src/shared/messages.ts b/extension/src/shared/messages.ts index a9b3765..09f8dd7 100644 --- a/extension/src/shared/messages.ts +++ b/extension/src/shared/messages.ts @@ -19,7 +19,13 @@ export type Request = | { type: 'get_setup_state' } | { type: 'save_setup'; config: VaultConfig; imageBase64: string } | { type: 'generate_password'; length: number } - | { type: 'fill_credentials'; username: string; password: string }; + | { type: 'fill_credentials'; username: string; password: string } + | { type: 'check_credential'; url: string; username: string; password: string } + | { type: 'blacklist_site'; hostname: string } + | { type: 'get_settings' } + | { type: 'update_settings'; settings: Partial } + | { type: 'get_blacklist' } + | { type: 'remove_blacklist'; hostname: string }; // --- Response types (service worker -> popup/content) --- diff --git a/extension/src/shared/types.ts b/extension/src/shared/types.ts index 5351b1e..faadde9 100644 --- a/extension/src/shared/types.ts +++ b/extension/src/shared/types.ts @@ -40,3 +40,14 @@ export interface SetupState { imageBase64: string | null; isConfigured: boolean; } + +/// User-configurable credential capture settings. +export interface IdfotoSettings { + captureEnabled: boolean; + captureStyle: 'bar' | 'toast'; +} + +export const DEFAULT_SETTINGS: IdfotoSettings = { + captureEnabled: false, + captureStyle: 'bar', +};