feat(ext/popup): Card view + form (card-silhouette signature, MM/YY selects)

This commit is contained in:
adlee-was-taken
2026-04-23 22:39:21 -04:00
parent 113b0b690a
commit 560a3c63c4
4 changed files with 338 additions and 2 deletions

View File

@@ -6,11 +6,13 @@ import type { Item, ItemType } from '../../shared/types';
import * as login from './types/login';
import * as secureNote from './types/secure-note';
import * as identity from './types/identity';
import * as card from './types/card';
export function renderItemForm(app: HTMLElement, mode: 'add' | 'edit'): void {
login.teardown(); // detail-view's ticker/listener don't leak into form
secureNote.teardown();
identity.teardown();
card.teardown();
const state = getState();
const existing = mode === 'edit' ? state.selectedItem : null;
const type: ItemType = existing?.type ?? state.newType ?? 'login';
@@ -19,7 +21,7 @@ export function renderItemForm(app: HTMLElement, mode: 'add' | 'edit'): void {
case 'login': return login.renderForm(app, mode, existing);
case 'secure_note': return secureNote.renderForm(app, mode, existing);
case 'identity': return identity.renderForm(app, mode, existing);
case 'card':
case 'card': return card.renderForm(app, mode, existing);
case 'key':
case 'totp':
case 'document': return renderComingSoon(app, type);