From a720f729439f4bfc5a533cc0a94af91fa0fa5fcb Mon Sep 17 00:00:00 2001 From: Moepchi Date: Sun, 25 Oct 2026 08:02:04 +0000 Subject: [PATCH] Open Options on a section from an #options/ link Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- web/src/App.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 91e7af6..3a8e76a 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -9138,8 +9138,10 @@ function AppInner() { const entry: ClientLogEntry = { id: ++logIdRef.current, timestamp: Date.now(), category, level, message }; setLogEntries((prev) => [...prev.slice(-(MAX_LOG_ENTRIES - 1)), entry]); }; - const [optionsDialogOpen, setOptionsDialogOpen] = useState(false); - const [optionsSection, setOptionsSection] = useState(OPTIONS_SECTIONS[0].id); + // client.webspeak3.de/#options/konto opens Options on that section (shareable link, e.g. for the ticker). + const linkedOptionsSection = OPTIONS_SECTIONS.find((s) => window.location.hash === `#options/${s.id}`)?.id; + const [optionsDialogOpen, setOptionsDialogOpen] = useState(!!linkedOptionsSection); + const [optionsSection, setOptionsSection] = useState(linkedOptionsSection ?? OPTIONS_SECTIONS[0].id); const socketRef = useRef(null); /** Multi-join: one gateway WebSocket (+ connector) per session tab. */ const [sessionTabs, setSessionTabs] = useState([]); @@ -13724,7 +13726,10 @@ function AppInner() { onClearCache={handleClearCache} section={optionsSection} onSectionChange={setOptionsSection} - onClose={() => setOptionsDialogOpen(false)} + onClose={() => { + setOptionsDialogOpen(false); + if (window.location.hash.startsWith("#options/")) window.history.replaceState(null, "", window.location.pathname + window.location.search); + }} designSelection={designSelection} onDesignSelectionChange={handleDesignSelectionChange} customThemes={customThemes}