diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 84f2e30..3c18f42 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -258,7 +258,7 @@ export default function App() { }, []) return ( -
+
updateSession({ query: q })} @@ -269,6 +269,8 @@ export default function App() { updateSession({ theme: t })} + sidebarOpen={session.sidebarOpen} + onSidebarOpenChange={(v) => updateSession({ sidebarOpen: v })} wideView={session.wideView} onWideViewChange={(w) => updateSession({ wideView: w })} showToc={session.showToc} diff --git a/frontend/src/components/Toolbar.tsx b/frontend/src/components/Toolbar.tsx index f35224c..c208b56 100644 --- a/frontend/src/components/Toolbar.tsx +++ b/frontend/src/components/Toolbar.tsx @@ -1,7 +1,7 @@ import { useState, useCallback, useEffect, useRef } from 'react' import { Sun, Moon, Monitor, ChevronsLeftRight, List, - Copy, Check, RotateCcw, ChevronDown, AlertCircle, + Copy, Check, RotateCcw, ChevronDown, AlertCircle, PanelLeft, } from 'lucide-react' import type { Session } from '../types' import type { ParseResult } from '../lib/markdown' @@ -9,6 +9,8 @@ import type { ParseResult } from '../lib/markdown' interface Props { theme: Session['theme'] onThemeChange: (t: Session['theme']) => void + sidebarOpen: boolean + onSidebarOpenChange: (v: boolean) => void wideView: boolean onWideViewChange: (w: boolean) => void showToc: boolean @@ -49,9 +51,9 @@ async function writeToClipboard(text: string): Promise { const ICON_SIZE = 15 export default function Toolbar({ - theme, onThemeChange, wideView, onWideViewChange, - showToc, onShowTocChange, showRaw, onShowRawChange, - rawContent, parseResult, onRestart, + theme, onThemeChange, sidebarOpen, onSidebarOpenChange, + wideView, onWideViewChange, showToc, onShowTocChange, + showRaw, onShowRawChange, rawContent, parseResult, onRestart, }: Props) { const [copyState, setCopyState] = useState('idle') const [showCopyMenu, setShowCopyMenu] = useState(false) @@ -94,6 +96,13 @@ export default function Toolbar({ return (
+