diff --git a/src/App.jsx b/src/App.jsx index 23d9e31..ae41543 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -37,6 +37,7 @@ const ImportPage = lazy(() => import('./pages/ImportPage.jsx')); const ReaderPage = lazy(() => import('./pages/ReaderPage.jsx')); const SettingsPage = lazy(() => import('./pages/SettingsPage.jsx')); const SetupPage = lazy(() => import('./pages/SetupPage.jsx')); +const InsightsPage = lazy(() => import('./pages/InsightsPage.jsx')); const StudyPage = lazy(() => import('./pages/StudyPage.jsx')); const OutlinePage = lazy(() => import('./pages/OutlinePage.jsx')); const ScriptPage = lazy(() => import('./pages/ScriptPage.jsx')); @@ -167,7 +168,7 @@ const AppInner = () => { useEffect(() => { const names = { home: 'My Studies', setup: 'Chunks', study: 'Study', outline: 'Outline', script: 'Script', export: 'Export', - import: 'Import', pronunciation: 'Pronunciation Guide', settings: 'Settings', admin: 'Admin', 'reading-plans': 'Reading Plans', prayer: 'Prayer journal', + import: 'Import', pronunciation: 'Pronunciation Guide', settings: 'Settings', admin: 'Admin', 'reading-plans': 'Reading Plans', prayer: 'Prayer journal', insights: 'Insights', }; let page = names[currentPage] ?? ''; if (currentPage === 'reader') { @@ -629,6 +630,7 @@ function AppRouter() { if (currentPage === 'prayer') return ; if (currentPage === 'reader') return ; if (currentPage === 'import') return ; + if (currentPage === 'insights') return ; if (currentPage === 'study') return ; if (currentPage === 'outline') return ; if (currentPage === 'script') return ; diff --git a/src/components/HandoutExport.jsx b/src/components/HandoutExport.jsx index 6abc32b..43d4004 100644 --- a/src/components/HandoutExport.jsx +++ b/src/components/HandoutExport.jsx @@ -1,14 +1,15 @@ // Export → Lesson handout: a printable page for each session (or one session), for a group to follow along. import { useState } from 'react'; -import { printHandout, sessionsFor } from '../utils/handout.js'; +import { HANDOUT_LAYOUTS, printHandout, sessionsFor } from '../utils/handout.js'; export default function HandoutExport({ project }) { const sessions = sessionsFor(project); const [which, setWhich] = useState('all'); const [lines, setLines] = useState(true); + const [layout, setLayout] = useState('standard'); const [blocked, setBlocked] = useState(false); if (sessions.length === 0) return null; - const go = () => setBlocked(!printHandout(project, which === 'all' ? null : [which], { answerLines: lines })); + const go = () => setBlocked(!printHandout(project, which === 'all' ? null : [which], { answerLines: lines, layout })); return (

Lesson handout

@@ -20,6 +21,11 @@ export default function HandoutExport({ project }) { {sessions.map((s) => )} + diff --git a/src/components/WeeklyRecall.jsx b/src/components/WeeklyRecall.jsx index 7a30379..2d38804 100644 --- a/src/components/WeeklyRecall.jsx +++ b/src/components/WeeklyRecall.jsx @@ -16,6 +16,7 @@ export default function WeeklyRecall() { const { projectIndex, saveChunkRecall, openStudyChunk } = useApp(); const [step, setStep] = useState('card'); // card -> write -> compare -> done const [text, setText] = useState(''); + const [gaps, setGaps] = useState(''); const pick = useMemo( () => pickRecall(projectIndex.map((e) => loadProjectById(e.id)).filter(Boolean)), [projectIndex], @@ -24,7 +25,7 @@ export default function WeeklyRecall() { if (!pick) return null; const finish = (rating) => { - saveChunkRecall(pick.projectId, pick.chunk.id, { at: Date.now(), text: text.trim(), rating }); + saveChunkRecall(pick.projectId, pick.chunk.id, { at: Date.now(), text: text.trim(), rating, gaps: gaps.trim() }); setStep('done'); }; @@ -63,6 +64,10 @@ export default function WeeklyRecall() { ))} +