Build and Push Docker Image / build-and-push (push) Successful in 5m13s
- Earlier versions of a study: the server keeps compressed copies (about one per ten minutes of editing, the latest 30); Export shows what differs and puts one back (the replaced copy is kept) - Notes on highlights and bookmarks: synced, merged without loss, in exports and backups - Reader verse panel lists your studies and chunks that cover the verse, and opens them - Prayer journal: requests, who for, linked verses, days prayed, answers; synced, in backups and the account export; daily prayer reminder through ntfy - TODO.md lists the ideas not built yet Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
JavaScript
// Everything one account holds on the server, in the same file format the app's own "Download backup"
|
|
// makes, so it can be restored from Settings on any device.
|
|
export const BACKUP_APP = 'bible-study-project';
|
|
export const BACKUP_VERSION = 1;
|
|
|
|
// `store` supplies the account's data: { projects(), prefs(), marks(), ink(), plans() }.
|
|
export function buildAccountExport(user, store, now = new Date()) {
|
|
const prefs = store.prefs() ?? {};
|
|
const marks = store.marks() ?? {};
|
|
const plans = store.plans() ?? {};
|
|
return {
|
|
app: BACKUP_APP,
|
|
version: BACKUP_VERSION,
|
|
exportedAt: now.toISOString(),
|
|
account: user.email,
|
|
source: 'server',
|
|
projects: store.projects(),
|
|
reader: {
|
|
bookmarks: marks.bookmarks ?? {},
|
|
bookmarkNotes: marks.bookmarkNotes ?? {},
|
|
highlights: marks.highlights ?? [],
|
|
colorLabels: prefs.colorLabels?.v ?? {},
|
|
ink: store.ink() ?? {},
|
|
},
|
|
readingHistory: store.history?.() ?? { chapters: {}, days: [] },
|
|
prayers: store.prayers?.() ?? [],
|
|
readingPlans: {
|
|
progress: plans.progress ?? [],
|
|
customPlans: plans.customPlans ?? [],
|
|
activity: plans.activity ?? [],
|
|
},
|
|
};
|
|
}
|
|
|
|
export const accountExportName = (now = new Date()) => `bible-study-account-${now.toISOString().slice(0, 10)}.json`;
|