From 9a8cdf8e4f2102b77c5c7094beec5bfe83f5b246 Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Sun, 3 May 2026 21:36:11 -0400 Subject: [PATCH] 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 --- .../popup/components/attachments-disclosure.ts | 5 +++-- extension/src/popup/components/field-history.ts | 5 +++-- extension/src/popup/components/settings.ts | 4 ++-- extension/src/popup/components/trash.ts | 15 ++++++++++++--- extension/src/popup/components/types/document.ts | 8 ++++---- extension/src/shared/glyphs.ts | 3 +++ extension/src/vault/vault.ts | 5 +++-- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/extension/src/popup/components/attachments-disclosure.ts b/extension/src/popup/components/attachments-disclosure.ts index 422c37a..5206085 100644 --- a/extension/src/popup/components/attachments-disclosure.ts +++ b/extension/src/popup/components/attachments-disclosure.ts @@ -7,6 +7,7 @@ import { sendMessage, escapeHtml } from '../../shared/state'; import type { AttachmentRef, VaultSettings } from '../../shared/types'; +import { GLYPH_TYPE_DOCUMENT } from '../../shared/glyphs'; export type DisclosureMode = 'edit' | 'view'; @@ -53,8 +54,8 @@ export function renderAttachmentsDisclosure(opts: AttachmentsDisclosureOpts): st const action = opts.mode === 'edit' ? 'ร—' : 'โ†“'; const actionClass = opts.mode === 'edit' ? 'attachment-row__remove' : 'attachment-row__download'; const iconHtml = isImage(a.mime_type) - ? `๐Ÿ“„` - : `๐Ÿ“„`; + ? `${GLYPH_TYPE_DOCUMENT}` + : `${GLYPH_TYPE_DOCUMENT}`; return `
${iconHtml} diff --git a/extension/src/popup/components/field-history.ts b/extension/src/popup/components/field-history.ts index 27de410..1edf1f2 100644 --- a/extension/src/popup/components/field-history.ts +++ b/extension/src/popup/components/field-history.ts @@ -3,6 +3,7 @@ import { getState, setState, sendMessage, navigate, escapeHtml } from '../../shared/state'; import { colorizePassword } from '../../shared/password-coloring'; import type { FieldHistoryView } from '../../shared/types'; +import { GLYPH_COPY } from '../../shared/glyphs'; function relativeTime(unixSec: number): string { const now = Math.floor(Date.now() / 1000); @@ -75,7 +76,7 @@ export async function renderFieldHistory(app: HTMLElement): Promise { ${isCurrent ? 'current' : ''} ${isCurrent ? 'set' : 'changed'} ${relativeTime(timestamp)}
- + `; } @@ -140,7 +141,7 @@ export async function renderFieldHistory(app: HTMLElement): Promise { const value = valueStore.get(key) ?? ''; await navigator.clipboard.writeText(value); btn.textContent = 'โœ“'; - setTimeout(() => { btn.textContent = '๐Ÿ“‹'; }, 1500); + setTimeout(() => { btn.textContent = GLYPH_COPY; }, 1500); }); }); } diff --git a/extension/src/popup/components/settings.ts b/extension/src/popup/components/settings.ts index d303a62..ab4b60c 100644 --- a/extension/src/popup/components/settings.ts +++ b/extension/src/popup/components/settings.ts @@ -2,7 +2,7 @@ import { sendMessage, navigate, escapeHtml } from '../../shared/state'; import type { DeviceSettings } from '../../shared/types'; -import { GLYPH_TRASH, GLYPH_DEVICES } from '../../shared/glyphs'; +import { GLYPH_TRASH, GLYPH_DEVICES, GLYPH_SYNC } from '../../shared/glyphs'; import { loadColorScheme, saveColorScheme, resetColorScheme, DEFAULT_DIGIT_COLOR, DEFAULT_SYMBOL_COLOR, @@ -63,7 +63,7 @@ export async function renderSettings(app: HTMLElement): Promise {
- +
diff --git a/extension/src/popup/components/trash.ts b/extension/src/popup/components/trash.ts index 63b5b2d..27c32a5 100644 --- a/extension/src/popup/components/trash.ts +++ b/extension/src/popup/components/trash.ts @@ -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 = { - 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 { ? `

Trash is empty

` : items.map(([id, entry]) => `
- ${TYPE_ICONS[entry.type] ?? '๐Ÿ“ฆ'} + ${TYPE_ICONS[entry.type] ?? 'โ—ป'}
${escapeHtml(entry.title)} trashed ${relativeTime(entry.trashed_at ?? 0)} diff --git a/extension/src/popup/components/types/document.ts b/extension/src/popup/components/types/document.ts index ba4fdab..a60cf5e 100644 --- a/extension/src/popup/components/types/document.ts +++ b/extension/src/popup/components/types/document.ts @@ -4,7 +4,7 @@ import { getState, setState, sendMessage, navigate, escapeHtml, popOutToTab } from '../../../shared/state'; import { renderFormHeader } from '../form-header'; -import { REQUIRED_PILL_HTML } from '../../../shared/glyphs'; +import { REQUIRED_PILL_HTML, GLYPH_TYPE_DOCUMENT, GLYPH_PREVIEW } from '../../../shared/glyphs'; import type { Item, ItemId, ManifestEntry, Section, AttachmentRef } from '../../../shared/types'; import { renderSectionsEditor, wireSectionsEditor, @@ -76,7 +76,7 @@ export function renderForm(app: HTMLElement, mode: 'add' | 'edit', existing: Ite } return `
- ๐Ÿ“„ + ${GLYPH_TYPE_DOCUMENT} ${escapeHtml(primaryRef.filename)} ${formatBytes(primaryRef.size)} โ†‘ change @@ -283,13 +283,13 @@ export async function renderDetail(app: HTMLElement, item: Item): Promise
${escapeHtml(item.title)}
-
๐Ÿ“„
+
${GLYPH_TYPE_DOCUMENT}
${escapeHtml(primaryRef.filename)}
${formatBytes(primaryRef.size)} ยท ${new Date(primaryRef.created * 1000).toISOString().slice(0, 10)}
โ†“ download - ${isImageMime ? '๐Ÿ” preview' : ''} + ${isImageMime ? `${GLYPH_PREVIEW} preview` : ''}
diff --git a/extension/src/shared/glyphs.ts b/extension/src/shared/glyphs.ts index 1f9b29f..71a23a7 100644 --- a/extension/src/shared/glyphs.ts +++ b/extension/src/shared/glyphs.ts @@ -17,6 +17,9 @@ export const GLYPH_DEVICES = 'โŒฌ'; // sidebar devices nav export const GLYPH_SETTINGS = 'โš™'; // sidebar settings nav export const GLYPH_LOCK = 'โป'; // sidebar lock nav export const GLYPH_NEXT = 'โ–ธ'; // forward / next button (matches โ–พ/โ–ธ disclosure family) +export const GLYPH_COPY = 'โŽ˜'; // copy to clipboard +export const GLYPH_SYNC = 'โ‡…'; // sync / upload +export const GLYPH_PREVIEW = 'โŠ•'; // preview / expand export const GLYPH_VAULT_TAB = 'โง‰'; // U+29C9 pop-out to fullscreen vault tab diff --git a/extension/src/vault/vault.ts b/extension/src/vault/vault.ts index a198386..69feb7c 100644 --- a/extension/src/vault/vault.ts +++ b/extension/src/vault/vault.ts @@ -11,7 +11,7 @@ import type { import { registerHost } from '../shared/state'; import { lookupErrorCopy, type ErrorCta } from '../shared/error-copy'; import { - GLYPH_TRASH, GLYPH_SETTINGS, GLYPH_LOCK, + GLYPH_TRASH, GLYPH_DEVICES, GLYPH_SETTINGS, GLYPH_LOCK, 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'; @@ -300,6 +300,7 @@ function renderShell(app: HTMLElement): void {
+
@@ -386,7 +387,7 @@ function closeDrawer(): void { } function getDrawerCoreFields(item: Item): Array<[string, string, boolean]> { - const core = item.core as Record; + const core = item.core as unknown as Record; if (!core) return []; const fields: Array<[string, string, boolean]> = [];