Add Outline stage, parallel reading, offline saves, backup, sync-conflict handling and more
Study - New Outline stage (hierarchical I./A./1. points, linked to chunks, in all exports); the chunk stage is now "Chunks" - Home cards: passages shown as ranges, tags capped with "+N more" Reader - Side-by-side translations and a Compare tab per verse - Typeface, line spacing, verse-number settings; text and column scale with the screen - Highlights/bookmarks sheet with named colours (synced); BSB footnote spacing fix - Cmd-K palette (passages, studies, notes, marks), keyboard shortcuts and "?" help Flow and safety - Toasts with Undo replace most confirm()/alert() - Back/Forward move between pages - Server refuses saves over a newer copy (409); keep-mine / use-other banner; opening a study no longer re-stamps it - Latest chapter request wins when flipping quickly Offline and data - Save books, plan days or a whole BSB/NET for offline - Service worker fixes: helloao /api/ URLs were skipped and responses cloned too late - Settings: download/restore a full backup Accessibility - Sheets trap focus and close on Escape, skip link, focus ring, reduced motion, theme contrast raised to 4.5:1 (with a test) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1edbd364ea
commit
d13f55faf7
65 files changed
+2947
-208
No files matched your search
@@ -0,0 +1,28 @@
|
||||
// How outline points are numbered. Kept free of imports so both the page and the exporters can use it.
|
||||
|
||||
const ROMAN = [[10, 'X'], [9, 'IX'], [5, 'V'], [4, 'IV'], [1, 'I']];
|
||||
export function toRoman(n) {
|
||||
let out = '';
|
||||
let rest = n;
|
||||
for (const [value, symbol] of ROMAN) while (rest >= value) { out += symbol; rest -= value; }
|
||||
return out;
|
||||
}
|
||||
const letter = (n, upper) => {
|
||||
let out = '';
|
||||
let rest = n;
|
||||
while (rest > 0) { rest -= 1; out = String.fromCharCode((upper ? 65 : 97) + (rest % 26)) + out; rest = Math.floor(rest / 26); }
|
||||
return out;
|
||||
};
|
||||
|
||||
// I. / A. / 1. / a. / (1) / (a), by level
|
||||
export function labelFor(depth, index) {
|
||||
const n = index + 1;
|
||||
switch (depth) {
|
||||
case 0: return `${toRoman(n)}.`;
|
||||
case 1: return `${letter(n, true)}.`;
|
||||
case 2: return `${n}.`;
|
||||
case 3: return `${letter(n, false)}.`;
|
||||
case 4: return `(${n})`;
|
||||
default: return `(${letter(n, false)})`;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user