Document print header and upgrading to a newer build
Explain the configurable print header, how to carry data from an existing encrypted file into a newer build, and the warning not to seal over a file that should be kept. Correct the footer wording now that the page header is in flow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
14
README.md
14
README.md
@@ -16,10 +16,20 @@ The passphrase is prompted for (hidden) or read from `FW_PASSPHRASE`.
|
|||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
- `src/crypto.js` passphrase encryption (PBKDF2 -> AES-256-GCM)
|
- `src/crypto.js` passphrase encryption (PBKDF2 -> AES-256-GCM)
|
||||||
- `src/model.js` document schema and validation; `src/ops.js` edit helpers
|
- `src/model.js` document schema and validation (sections, records, and the
|
||||||
- `src/print.js` print helpers; `src/app.js` + `src/style.css` the UI
|
optional print `header`); `src/ops.js` edit helpers
|
||||||
|
- `src/print.js` print helpers (secret masking, header layout)
|
||||||
|
- `src/app.js` + `src/style.css` the UI, including the Print header panel
|
||||||
- `src/template.js` the HTML skeleton shared by `build.js` and in-page Save
|
- `src/template.js` the HTML skeleton shared by `build.js` and in-page Save
|
||||||
- `docs/thumbdrive/` what goes on the drive alongside the HTML file
|
- `docs/thumbdrive/` what goes on the drive alongside the HTML file
|
||||||
|
|
||||||
|
## Upgrading a file to a newer build
|
||||||
|
The data lives in the encrypted payload of each `final-wishes.html`, not in
|
||||||
|
the app code, so a rebuild never changes an existing file. To move data into a
|
||||||
|
newer build: `npm run build`, open `dist/final-wishes.html`, choose
|
||||||
|
**Open your existing Final Wishes file**, unlock it, then Save under a *new*
|
||||||
|
file name and verify it before replacing the old one. Never point
|
||||||
|
`npm run seal --out` at a file you want to keep: it builds from `data/seed.json`.
|
||||||
|
|
||||||
## Never commit
|
## Never commit
|
||||||
`*.pdf` and `data/` hold real personal data and are git-ignored.
|
`*.pdf` and `data/` hold real personal data and are git-ignored.
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ Either route gives the same kind of file:
|
|||||||
a JSON file or start a new document, then Save. You will be asked to
|
a JSON file or start a new document, then Save. You will be asked to
|
||||||
choose a passphrase.
|
choose a passphrase.
|
||||||
|
|
||||||
|
**Never write a seal over a file you want to keep.** `npm run seal` builds
|
||||||
|
from `data/seed.json`, not from your latest edits; use it only for the very
|
||||||
|
first file. After that, edit in the page and Save.
|
||||||
|
|
||||||
After sealing, `data/seed.json` is still plaintext. Delete it (and see
|
After sealing, `data/seed.json` is still plaintext. Delete it (and see
|
||||||
"Security clean-up" below). `data/` and `*.pdf` are git-ignored on purpose.
|
"Security clean-up" below). `data/` and `*.pdf` are git-ignored on purpose.
|
||||||
|
|
||||||
@@ -36,11 +40,30 @@ After sealing, `data/seed.json` is still plaintext. Delete it (and see
|
|||||||
- Chrome/Edge: pick the drive file once; later saves overwrite silently.
|
- Chrome/Edge: pick the drive file once; later saves overwrite silently.
|
||||||
- Firefox/Safari: a new `final-wishes.html` downloads. Copy it over the
|
- Firefox/Safari: a new `final-wishes.html` downloads. Copy it over the
|
||||||
old one on the drive.
|
old one on the drive.
|
||||||
3. Saving updates "Last update" and the per-record dates, which show on the
|
3. Saving updates "Last update" and the per-record dates. "Last update" is
|
||||||
printed footer.
|
what the printed header shows. Editing the header settings themselves does
|
||||||
|
not change it.
|
||||||
4. If you changed the passphrase, the old file still opens with the *old*
|
4. If you changed the passphrase, the old file still opens with the *old*
|
||||||
one until you save and replace it.
|
one until you save and replace it.
|
||||||
|
|
||||||
|
## Upgrading the app (new version, same data)
|
||||||
|
Your data is stored encrypted inside each `final-wishes.html`; the app code
|
||||||
|
sits beside it in the same file. A file therefore keeps running the version it
|
||||||
|
was saved with until you move its data into a newer build:
|
||||||
|
|
||||||
|
1. `npm run build` (or take a newer `final-wishes.html` build) and open
|
||||||
|
`dist/final-wishes.html`.
|
||||||
|
2. On the start screen choose **Open your existing Final Wishes file**, pick
|
||||||
|
your current file and unlock it with its passphrase. The old file is only
|
||||||
|
read, not changed.
|
||||||
|
3. Click **Save** and give the result a **new name** (for example
|
||||||
|
`final-wishes-new.html`) rather than the current one.
|
||||||
|
4. Open the new file, unlock it, and look through it. Only then replace the
|
||||||
|
old file (keep the old one in `backups/`).
|
||||||
|
|
||||||
|
Documents made by older versions keep working: anything a newer version added
|
||||||
|
(such as the print header) falls back to a default until you set it.
|
||||||
|
|
||||||
## Backups
|
## Backups
|
||||||
- **Backup copy** downloads `final-wishes-YYYYMMDD.html` to your Downloads
|
- **Backup copy** downloads `final-wishes-YYYYMMDD.html` to your Downloads
|
||||||
folder. Move it into `backups/`.
|
folder. Move it into `backups/`.
|
||||||
@@ -60,10 +83,32 @@ After sealing, `data/seed.json` is still plaintext. Delete it (and see
|
|||||||
|
|
||||||
## Printing
|
## Printing
|
||||||
**Print...** offers "Withhold secrets" (safe overview) and "Include
|
**Print...** offers "Withhold secrets" (safe overview) and "Include
|
||||||
secrets" (full copy). Print on Letter paper with browser headers/footers
|
secrets" (full copy). Print on Letter paper with the browser's own
|
||||||
off. A full copy is as sensitive as the passwords on it: store it in the fire
|
"Headers and footers" turned off (that is separate from the document header
|
||||||
safe and shred superseded copies. Check footer placement on your own printer
|
below). A full copy is as sensitive as the passwords on it: store it in the
|
||||||
the first time; it was only verified in Chromium.
|
fire safe and shred superseded copies. Page layout was checked by rendering
|
||||||
|
pages in Chromium (Chrome/Edge); it has not been checked in Firefox or Safari,
|
||||||
|
so look at a test print the first time.
|
||||||
|
|
||||||
|
### The print header
|
||||||
|
Every printed page starts with a header line in larger bold type. It is part
|
||||||
|
of the document, so it is saved with the rest and is encrypted too. Open
|
||||||
|
**Print header** at the bottom of the sidebar to see a live preview, then
|
||||||
|
**Edit** to change it:
|
||||||
|
|
||||||
|
- Add as many fields as you like. Each is either **Text** (printed as
|
||||||
|
written) or **Last updated** (an optional label such as `Last update: `
|
||||||
|
followed by the document's last-update date).
|
||||||
|
- Each field's alignment is **Left**, **Right** or **Not aligned**. At most one
|
||||||
|
field can be left aligned and one right aligned; the other choice shows
|
||||||
|
"(in use)" and is disabled.
|
||||||
|
- Printed order is always: the left field, then the unaligned fields in the
|
||||||
|
order listed, then the right field. List order only matters between
|
||||||
|
unaligned fields. Use the arrows to reorder and the cross to remove.
|
||||||
|
- **Reset to default** restores the title on the left and "Last update: date"
|
||||||
|
on the right, which is also what a document with no header setting uses.
|
||||||
|
- Keep the left and middle text short. If the line gets crowded, the left
|
||||||
|
field wraps first; the right and middle fields never wrap.
|
||||||
|
|
||||||
## Keep it current
|
## Keep it current
|
||||||
Nothing in the app reminds you to review. Set a yearly reminder. Things that
|
Nothing in the app reminds you to review. Set a yearly reminder. Things that
|
||||||
|
|||||||
Reference in New Issue
Block a user