Put every preference in Settings; same header on every page
Build and Push Docker Image / build-and-push (push) Successful in 5m7s
Build and Push Docker Image / build-and-push (push) Successful in 5m7s
- Settings > Preferences: typeface, line spacing, verse numbers, highlight colour names, My Studies grid/list and sort, verse-of-the-day Bible and picture, commentary sources, study templates - Header uses one fixed width and reserves scrollbar space so the nav sits in the same place on every page Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a2185ba1dd
commit
512c6b6889
7 files changed
+204
-1
No files matched your search
@@ -5,6 +5,9 @@ import { useApp } from '../context/AppContext.js';
|
||||
import PageShell from '../components/study/PageShell.jsx';
|
||||
import { READER_TRANSLATIONS } from '../utils/bibleText.js';
|
||||
import DataSection from '../components/settings/DataSection.jsx';
|
||||
import { DashboardSettings, HighlightColours, StudyTemplates, VerseOfDaySettings } from '../components/settings/MoreSettings.jsx';
|
||||
import { useLocalSetting } from '../hooks/useLocalSetting.js';
|
||||
import { useIqAvailable } from '../hooks/useIq.js';
|
||||
import PasskeysSection from '../components/settings/PasskeysSection.jsx';
|
||||
import DevicesSection from '../components/settings/DevicesSection.jsx';
|
||||
import { COMMENTARIES } from '../hooks/useVerseStudy.js';
|
||||
@@ -61,11 +64,14 @@ export default function SettingsPage() {
|
||||
readerWide, setReaderWide,
|
||||
readerCommentary, setReaderCommentary,
|
||||
audioNarrator, setAudioNarrator,
|
||||
readerFont, setReaderFont, readerSpacing, setReaderSpacing, readerVerseNumbers, setReaderVerseNumbers,
|
||||
settingsFocus, clearSettingsFocus,
|
||||
} = useApp();
|
||||
|
||||
// "Back up my data" from the ⌘K palette lands on that section
|
||||
const narrators = useLazyNarrators(audioNarrator);
|
||||
const iqOn = useIqAvailable();
|
||||
const [iqMode, setIqMode] = useLocalSetting('iq-commentary-mode', '0');
|
||||
const [tab, setTab] = useState(settingsFocus === 'backup' ? 'data' : 'account');
|
||||
useEffect(() => {
|
||||
if (!settingsFocus) return;
|
||||
@@ -284,9 +290,23 @@ export default function SettingsPage() {
|
||||
{COMMENTARIES.map((c) => <option key={c.id} value={c.id}>{c.name}</option>)}
|
||||
</select>
|
||||
</PrefRow>
|
||||
{iqOn && (
|
||||
<PrefRow label="Commentary sources" hint="Classic is the short list. More sources adds IQ Bible’s many commentaries.">
|
||||
<Segmented label="Commentary sources" options={[['0', 'Classic'], ['1', 'More sources']]} value={iqMode} onChange={setIqMode} />
|
||||
</PrefRow>
|
||||
)}
|
||||
<PrefRow label="Text size" hint="Reader text.">
|
||||
<Segmented label="Text size" options={FONT_SIZES.map(([l, n]) => [n, l])} value={readerFontSize} onChange={setReaderFontSize} />
|
||||
</PrefRow>
|
||||
<PrefRow label="Typeface">
|
||||
<Segmented label="Typeface" options={[['serif', 'Serif'], ['sans', 'Sans'], ['easy', 'Easy to read']]} value={readerFont} onChange={setReaderFont} />
|
||||
</PrefRow>
|
||||
<PrefRow label="Line spacing">
|
||||
<Segmented label="Line spacing" options={[['snug', 'Snug'], ['normal', 'Normal'], ['airy', 'Airy']]} value={readerSpacing} onChange={setReaderSpacing} />
|
||||
</PrefRow>
|
||||
<PrefRow label="Verse numbers">
|
||||
<Segmented label="Verse numbers" options={[[true, 'Show'], [false, 'Hide']]} value={readerVerseNumbers} onChange={setReaderVerseNumbers} />
|
||||
</PrefRow>
|
||||
<PrefRow label="Reading width" hint="One column, or two on a wide screen.">
|
||||
<Segmented label="Reading width" options={[[false, 'Column'], [true, 'Two columns']]} value={readerWide} onChange={setReaderWide} />
|
||||
</PrefRow>
|
||||
@@ -389,6 +409,10 @@ export default function SettingsPage() {
|
||||
<DataSection />
|
||||
)}
|
||||
|
||||
{tab === 'prefs' && <HighlightColours />}
|
||||
{tab === 'prefs' && <DashboardSettings />}
|
||||
{tab === 'prefs' && <VerseOfDaySettings />}
|
||||
{tab === 'prefs' && <StudyTemplates />}
|
||||
{tab === 'prefs' && (
|
||||
<section className="rounded-2xl border border-[var(--r-line)] bg-[var(--r-bar)] p-6 space-y-4">
|
||||
<div>
|
||||
|
||||
Reference in new issue
Block a user