diff --git a/extension/src/popup/components/field-history.ts b/extension/src/popup/components/field-history.ts index a61ee6b..27de410 100644 --- a/extension/src/popup/components/field-history.ts +++ b/extension/src/popup/components/field-history.ts @@ -1,6 +1,7 @@ /// Field history view — shows password/concealed field history for an item. import { getState, setState, sendMessage, navigate, escapeHtml } from '../../shared/state'; +import { colorizePassword } from '../../shared/password-coloring'; import type { FieldHistoryView } from '../../shared/types'; function relativeTime(unixSec: number): string { @@ -103,6 +104,16 @@ export async function renderFieldHistory(app: HTMLElement): Promise { `; + // Colorize revealed entries: replace plain-text content with colorized spans + app.querySelectorAll('.history-entry__value.revealed').forEach((el) => { + const key = el.closest('.history-entry')?.dataset.entry ?? ''; + const plaintext = valueStore.get(key); + if (plaintext !== undefined) { + el.textContent = ''; + el.appendChild(colorizePassword(plaintext)); + } + }); + // Wire handlers app.querySelector('#back-btn')?.addEventListener('click', () => navigate('detail'));