diff --git a/extension/src/popup/components/item-form.ts b/extension/src/popup/components/item-form.ts index 0460c7c..a2019e7 100644 --- a/extension/src/popup/components/item-form.ts +++ b/extension/src/popup/components/item-form.ts @@ -3,15 +3,19 @@ import { navigate, getState, setState, escapeHtml, popOutToTab, isInTab } from '../../shared/state'; import type { Item, ItemType } from '../../shared/types'; +import { + GLYPH_TYPE_LOGIN, GLYPH_TYPE_SECURE_NOTE, GLYPH_TYPE_TOTP, + GLYPH_TYPE_CARD, GLYPH_TYPE_IDENTITY, GLYPH_TYPE_KEY, GLYPH_TYPE_DOCUMENT, +} from '../../shared/glyphs'; -const TYPE_OPTIONS: Array<{ type: ItemType; icon: string; label: string }> = [ - { type: 'login', icon: '๐', label: 'login' }, - { type: 'secure_note', icon: '๐', label: 'secure note' }, - { type: 'identity', icon: '๐ค', label: 'identity' }, - { type: 'card', icon: '๐ณ', label: 'card' }, - { type: 'key', icon: '๐', label: 'key' }, - { type: 'document', icon: '๐', label: 'document' }, - { type: 'totp', icon: 'โฑ๏ธ', label: 'totp' }, +const TYPE_OPTIONS: Array<{ type: ItemType; icon: string; label: string; description: string }> = [ + { type: 'login', icon: GLYPH_TYPE_LOGIN, label: 'Login', description: 'Username + password' }, + { type: 'secure_note', icon: GLYPH_TYPE_SECURE_NOTE, label: 'Secure Note', description: 'Encrypted text note' }, + { type: 'identity', icon: GLYPH_TYPE_IDENTITY, label: 'Identity', description: 'Personal details' }, + { type: 'card', icon: GLYPH_TYPE_CARD, label: 'Card', description: 'Credit / debit card' }, + { type: 'key', icon: GLYPH_TYPE_KEY, label: 'SSH / API Key', description: 'Keys and tokens' }, + { type: 'document', icon: GLYPH_TYPE_DOCUMENT, label: 'Document', description: 'File attachment' }, + { type: 'totp', icon: GLYPH_TYPE_TOTP, label: 'TOTP', description: '2FA authenticator' }, ]; import * as login from './types/login'; import * as secureNote from './types/secure-note'; @@ -54,36 +58,36 @@ export function renderItemForm(app: HTMLElement, mode: 'add' | 'edit'): void { function renderTypeSelection(app: HTMLElement): void { app.innerHTML = `