fix: replace all remaining emoji with monochrome glyph constants
- trash.ts TYPE_ICONS map uses GLYPH_TYPE_* constants - field-history.ts copy button uses GLYPH_COPY - attachments-disclosure.ts thumbnail/icon uses GLYPH_TYPE_DOCUMENT - settings.ts sync button uses GLYPH_SYNC - document.ts thumb/sigblock/preview use GLYPH_TYPE_DOCUMENT + GLYPH_PREVIEW - glyphs.ts adds GLYPH_COPY, GLYPH_SYNC, GLYPH_PREVIEW - vault.ts adds GLYPH_DEVICES import + devices sidebar nav button Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,10 +2,19 @@
|
||||
|
||||
import { getState, setState, sendMessage, navigate, escapeHtml } from '../../shared/state';
|
||||
import type { ItemId, ManifestEntry, VaultSettings } from '../../shared/types';
|
||||
import {
|
||||
GLYPH_TYPE_LOGIN, GLYPH_TYPE_SECURE_NOTE, GLYPH_TYPE_IDENTITY, GLYPH_TYPE_CARD,
|
||||
GLYPH_TYPE_KEY, GLYPH_TYPE_DOCUMENT, GLYPH_TYPE_TOTP,
|
||||
} from '../../shared/glyphs';
|
||||
|
||||
const TYPE_ICONS: Record<string, string> = {
|
||||
login: '🔑', secure_note: '📝', identity: '👤', card: '💳',
|
||||
key: '🔐', document: '📄', totp: '⏱️',
|
||||
login: GLYPH_TYPE_LOGIN,
|
||||
secure_note: GLYPH_TYPE_SECURE_NOTE,
|
||||
identity: GLYPH_TYPE_IDENTITY,
|
||||
card: GLYPH_TYPE_CARD,
|
||||
key: GLYPH_TYPE_KEY,
|
||||
document: GLYPH_TYPE_DOCUMENT,
|
||||
totp: GLYPH_TYPE_TOTP,
|
||||
};
|
||||
|
||||
function relativeTime(unixSec: number): string {
|
||||
@@ -64,7 +73,7 @@ export async function renderTrash(app: HTMLElement): Promise<void> {
|
||||
? `<p class="muted" style="text-align:center;margin-top:32px;">Trash is empty</p>`
|
||||
: items.map(([id, entry]) => `
|
||||
<div class="trash-row" data-id="${escapeHtml(id)}">
|
||||
<span class="trash-row__icon">${TYPE_ICONS[entry.type] ?? '📦'}</span>
|
||||
<span class="trash-row__icon">${TYPE_ICONS[entry.type] ?? '◻'}</span>
|
||||
<div class="trash-row__info">
|
||||
<span class="trash-row__title">${escapeHtml(entry.title)}</span>
|
||||
<span class="trash-row__meta">trashed ${relativeTime(entry.trashed_at ?? 0)}</span>
|
||||
|
||||
Reference in New Issue
Block a user