diff --git a/extension/src/popup/components/item-list.ts b/extension/src/popup/components/item-list.ts index 54bf241..5935986 100644 --- a/extension/src/popup/components/item-list.ts +++ b/extension/src/popup/components/item-list.ts @@ -3,7 +3,11 @@ /// to the detail view. import { getState, setState, sendMessage, navigate, escapeHtml, openVaultTab } from '../../shared/state'; -import { GLYPH_VAULT_TAB } from '../../shared/glyphs'; +import { + GLYPH_VAULT_TAB, + 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'; import type { ItemId, ItemType, ManifestEntry, Item } from '../../shared/types'; /// Extract the display hostname from an icon_hint or fallback to the first tag. @@ -13,16 +17,16 @@ function metaLine(e: ManifestEntry): string { return ''; } -/// Emoji icon per item type. Placeholder until we ship real SVG icons. +/// Glyph icon per item type. function typeIcon(t: ItemType): string { switch (t) { - case 'login': return '🔑'; - case 'secure_note': return '📝'; - case 'identity': return '🪪'; - case 'card': return '💳'; - case 'key': return '🗝'; - case 'document': return '📄'; - case 'totp': return '⏱'; + case 'login': return GLYPH_TYPE_LOGIN; + case 'secure_note': return GLYPH_TYPE_SECURE_NOTE; + case 'identity': return GLYPH_TYPE_IDENTITY; + case 'card': return GLYPH_TYPE_CARD; + case 'key': return GLYPH_TYPE_KEY; + case 'document': return GLYPH_TYPE_DOCUMENT; + case 'totp': return GLYPH_TYPE_TOTP; } } @@ -32,7 +36,7 @@ function buildRowsHtml(): string { return filtered.length > 0 ? filtered.map(([id, e], i) => `
- ${escapeHtml(e.title)}${e.attachment_summaries.length > 0 ? ' 📎' : ''} + ${escapeHtml(e.title)}${e.attachment_summaries.length > 0 ? ' ' : ''} ${escapeHtml(metaLine(e))}
`).join('')