From 708f29393917f32621bc4d21ae080fff9a0454d1 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Thu, 13 Aug 2026 16:21:08 -0400 Subject: [PATCH] Auto-hide toolbar in wide reader mode with focus bar restore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wide mode now enters focus state automatically: the full toolbar collapses and a slim frosted bar appears at the top showing the current chapter name, Prev/Next buttons, and a ⚙ Tools button to restore the toolbar. A ✕ Hide button inside the toolbar lets you re-enter focus mode without toggling wide. Co-Authored-By: Claude Sonnet 4.6 --- src/pages/ReaderPage.jsx | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/pages/ReaderPage.jsx b/src/pages/ReaderPage.jsx index e31b69d..0ea7b8c 100644 --- a/src/pages/ReaderPage.jsx +++ b/src/pages/ReaderPage.jsx @@ -57,8 +57,12 @@ export default function ReaderPage() { const [selectionPicker, setSelectionPicker] = useState(null); const swipeTouchRef = useRef(null); + const [toolbarVisible, setToolbarVisible] = useState(true); + useEffect(() => { localStorage.setItem('reader-wide', readerWideLayout ? '1' : '0'); + // Auto-collapse toolbar when entering wide mode, restore when leaving + setToolbarVisible(!readerWideLayout); }, [readerWideLayout]); // Swipe left/right to navigate chapters @@ -206,6 +210,9 @@ export default function ReaderPage() { onTouchStart={handleTouchStart} onTouchEnd={handleTouchEnd} > + {/* Collapsible toolbar — hidden in wide focus mode */} +
+ {/* Navigation + tools bar */}
+
{/* end collapsible toolbar */} + {/* Whole-Bible search results */} {readerSearchActive && readerSearchScope === 'bible' && (
@@ -580,6 +598,29 @@ export default function ReaderPage() { )} + {/* Wide focus mode — fixed top bar to restore toolbar */} + {readerWideLayout && !toolbarVisible && ( +
+ + {readerBook?.name} {readerChapter} + +
+ + + +
+
+ )} + {/* Side chapter nav — fixed left/right arrows */} {!readerDrawMode && ( <>