Add viewer/editor UI

Passphrase unlock (or open a plain JSON file while no payload is
embedded), sectioned navigation, read-only cards with masked secret
fields and a reveal toggle, and an edit mode with add/remove/reorder for
sections, records, fields and items. Pure edit operations live in
ops.js with tests. DOM is built with textContent only.

Closes #4

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 08:10:21 -05:00
parent 2c713f3a9b
commit d882debb9b
5 changed files with 400 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ const read = (p) => readFileSync(join(root, 'src', p), 'utf8');
const out = read('index.html')
.replace('/*__CSS__*/', () => read('style.css'))
// Plain-script bundle: drop ES `export` so modules concatenate into one scope.
.replace('/*__JS__*/', () => ['crypto.js', 'model.js'].map((f) => read(f).replace(/^export /gm, '')).concat(read('app.js')).join('\n'))
.replace('/*__JS__*/', () => ['crypto.js', 'model.js', 'ops.js'].map((f) => read(f).replace(/^export /gm, '')).concat(read('app.js')).join('\n'))
.replace('/*__PAYLOAD__*/', () => '');
mkdirSync(join(root, 'dist'), { recursive: true });