Skip to main content

Module prefs

Module prefs 

Source
Expand description

What the page remembers about how it is drawn, and who it attributes its work to.

Four choices, kept in localStorage as one JSON blob — and, beside them under a key of its own, the library’s list of documents to offer. Every access goes through Store, which answers the defaults where the browser refuses — a private window, blocked site data, an origin with no storage at all — so a shell that cannot remember still runs.

The light/dark end is read once for both halves of the page: the class the chrome varies on and the Palette the kernel is told come from this one answer, so the bar and the ground cannot disagree.

Structs§

Preferences
The persisted preferences. #[serde(default)] so a blob written by an older build loads with the rest filled in, and an unknown key is left behind rather than failing the load.
Store
The origin’s store, or nothing where the browser will not open one.

Constants§

KEY 🔒
Where the blob is filed.
RECENT 🔒
Where the library’s recent list is filed, beside it.