feat(extension): update devices UI for new auth model
- Show revoked devices in collapsible section with strikethrough styling - Fetch revoked.json via new list_revoked message + router case - Registration flow uses register_device WASM API (private keys internal) - Display revoked_by and timestamp for each revoked entry - Update setup wizard to use new register_device API Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,7 @@ export type PopupMessage =
|
||||
| { type: 'upload_attachment'; itemId: string; filename: string; mimeType: string; bytes: ArrayBuffer }
|
||||
| { type: 'download_attachment'; itemId: string; attachmentId: string }
|
||||
| { type: 'list_devices' }
|
||||
| { type: 'list_revoked' }
|
||||
| { type: 'add_device'; name: string; public_key: string }
|
||||
| { type: 'register_this_device'; name: string }
|
||||
| { type: 'revoke_device'; name: string }
|
||||
@@ -139,6 +140,10 @@ export interface ListDevicesResponse extends Extract<Response, { ok: true }> {
|
||||
data: { devices: Device[] };
|
||||
}
|
||||
|
||||
export interface ListRevokedResponse extends Extract<Response, { ok: true }> {
|
||||
data: { revoked: Array<{ name: string; public_key: string; revoked_at: number; revoked_by: string }> };
|
||||
}
|
||||
|
||||
export interface ListTrashedResponse extends Extract<Response, { ok: true }> {
|
||||
data: { items: Array<[ItemId, ManifestEntry]> };
|
||||
}
|
||||
@@ -161,7 +166,7 @@ export const POPUP_ONLY_TYPES: ReadonlySet<PopupMessage['type']> = new Set([
|
||||
'ack_autofill_origin', 'get_settings', 'update_settings',
|
||||
'get_vault_settings', 'update_vault_settings', 'get_blacklist',
|
||||
'remove_blacklist', 'get_active_tab_url', 'list_groups', 'upload_attachment', 'download_attachment',
|
||||
'list_devices', 'add_device', 'register_this_device', 'revoke_device',
|
||||
'list_devices', 'list_revoked', 'add_device', 'register_this_device', 'revoke_device',
|
||||
'list_trashed', 'restore_item', 'purge_item', 'purge_all_trash',
|
||||
'get_field_history',
|
||||
'get_session_config', 'update_session_config',
|
||||
|
||||
Reference in New Issue
Block a user