Add configurable running print header

The line printed on every page is now a header stored in the document as
header.fields: any number of Text / Last updated fields, each optionally
aligned left or right (at most one of each). Printed order is left,
unaligned, right. Edited from a Print header panel with live preview;
documents without a header use the previous title/last-update default.
The header is a repeating table header so it sits in flow and cannot
overlap body text, replacing the fixed-position footer.

Also add "Open your existing Final Wishes file" to the start screen so
data in an older encrypted file can be carried into a newer build.

Closes #9

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 13:23:31 -05:00
parent e4a64eea5d
commit 70c384cdcb
9 changed files with 238 additions and 21 deletions

View File

@@ -16,10 +16,10 @@ import { assertValid } from './src/model.js';
const root = dirname(fileURLToPath(import.meta.url));
const read = (p) => readFileSync(join(root, 'src', p), 'utf8');
// Modules are concatenated (ES `export` dropped) ahead of app.js into one scope.
// Modules are concatenated (ES `import` lines and `export` keywords dropped) ahead of app.js into one scope.
const MODULES = ['crypto.js', 'model.js', 'ops.js', 'print.js', 'template.js'];
export function bundleJs() {
return MODULES.map((f) => read(f).replace(/^export /gm, '')).concat(read('app.js')).join('\n');
return MODULES.map((f) => read(f).replace(/^import .*$/gm, '').replace(/^export /gm, '')).concat(read('app.js')).join('\n');
}
function parseArgs(argv) {