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:
@@ -19,7 +19,13 @@ export type Request =
|
|||||||
| { type: 'get_setup_state' }
|
| { type: 'get_setup_state' }
|
||||||
| { type: 'save_setup'; config: VaultConfig; imageBase64: string }
|
| { type: 'save_setup'; config: VaultConfig; imageBase64: string }
|
||||||
| { type: 'generate_password'; length: number }
|
| { 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) ---
|
// --- Response types (service worker -> popup/content) ---
|
||||||
|
|
||||||
|
|||||||
@@ -40,3 +40,14 @@ export interface SetupState {
|
|||||||
imageBase64: string | null;
|
imageBase64: string | null;
|
||||||
isConfigured: boolean;
|
isConfigured: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// User-configurable credential capture settings.
|
||||||
|
export interface IdfotoSettings {
|
||||||
|
captureEnabled: boolean;
|
||||||
|
captureStyle: 'bar' | 'toast';
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DEFAULT_SETTINGS: IdfotoSettings = {
|
||||||
|
captureEnabled: false,
|
||||||
|
captureStyle: 'bar',
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user