feat: add settings and credential capture message types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-12 12:22:24 -04:00
parent 68f2908156
commit 1916fa0f81
2 changed files with 18 additions and 1 deletions

View File

@@ -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<import('./types').IdfotoSettings> }
| { type: 'get_blacklist' }
| { type: 'remove_blacklist'; hostname: string };
// --- Response types (service worker -> popup/content) ---

View File

@@ -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',
};