From e5c5cc3f80c1bf30495b5d90f94c98941c4f7ca7 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Wed, 29 Jul 2026 21:08:25 +0200 Subject: [PATCH] Add Options dialog with the real client's settings sidebar Opens via Extras -> Optionen. Sidebar navigation matches the real TS3 client (Anwendung/myTeamSpeak/Wiedergabe/.../Meldungen) and switches the content panel, but the settings themselves are still placeholders - none of the actual options are wired up yet. Local-only for now, not deployed. --- web/src/App.css | 64 ++++++++++++++++++++++++++++++++++++++ web/src/App.tsx | 82 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 145 insertions(+), 1 deletion(-) diff --git a/web/src/App.css b/web/src/App.css index 95f6026..b12402a 100644 --- a/web/src/App.css +++ b/web/src/App.css @@ -783,6 +783,70 @@ gap: 0.6rem; } +.ts-options-dialog { + width: 640px; +} + +.ts-options-body { + display: flex; + height: 420px; +} + +.ts-options-sidebar { + width: 200px; + flex-shrink: 0; + border-right: 1px solid var(--border-soft); + padding: 0.5rem; + display: flex; + flex-direction: column; + gap: 0.15rem; + overflow-y: auto; +} + +.ts-options-sidebar-item { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.4rem 0.5rem; + border-radius: 2px; + font-size: 12px; + text-align: left; + background: none; + border: none; + color: var(--text); + cursor: pointer; +} + +.ts-options-sidebar-item:hover { + background: var(--row-hover); +} + +.ts-options-sidebar-item-active { + background: var(--row-hover); + outline: 1px solid var(--border); + font-weight: 600; +} + +.ts-options-sidebar-icon { + width: 1.2em; + text-align: center; +} + +.ts-options-content { + flex: 1; + padding: 1rem; +} + +.ts-options-content h3 { + margin: 0 0 0.5rem; +} + +.ts-options-placeholder { + font-size: 12px; + font-style: italic; + color: var(--text-muted); +} + .ts-dialog-titlebar { display: flex; align-items: center; diff --git a/web/src/App.tsx b/web/src/App.tsx index 0d4fa5e..d50326c 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -735,6 +735,70 @@ function AwayDialog({ ); } +const OPTIONS_SECTIONS = [ + { id: "anwendung", icon: "🎧", label: "Anwendung" }, + { id: "myteamspeak", icon: "👤", label: "myTeamSpeak" }, + { id: "wiedergabe", icon: "🔊", label: "Wiedergabe" }, + { id: "aufnahme", icon: "đŸŽ™ī¸", label: "Aufnahme" }, + { id: "design", icon: "đŸ–Œī¸", label: "Design" }, + { id: "erweiterungen", icon: "🧩", label: "Erweiterungen" }, + { id: "hotkeys", icon: "âŒ¨ī¸", label: "Hotkeys" }, + { id: "whispern", icon: "đŸ¤Ģ", label: "Whispern" }, + { id: "downloads", icon: "âŦ‡ī¸", label: "Downloads" }, + { id: "chat", icon: "đŸ’Ŧ", label: "Chat" }, + { id: "sicherheit", icon: "đŸ›Ąī¸", label: "Sicherheit" }, + { id: "nachrichten", icon: "🔤", label: "Nachrichten" }, + { id: "meldungen", icon: "â„šī¸", label: "Meldungen" }, +] as const; + +function OptionsDialog({ + section, + onSectionChange, + onClose, +}: { + section: string; + onSectionChange: (id: string) => void; + onClose: () => void; +}) { + const active = OPTIONS_SECTIONS.find((s) => s.id === section) ?? OPTIONS_SECTIONS[0]; + return ( +
+
e.stopPropagation()}> +
+ Optionen + +
+
+
+ {OPTIONS_SECTIONS.map((s) => ( + + ))} +
+
+

{active.label}

+

Diese Einstellungen sind noch nicht implementiert.

+
+
+
+
+ + +
+
+
+
+ ); +} + function App() { const [host, setHost] = useState(() => localStorage.getItem(LAST_HOST_KEY) ?? "localhost"); const [nickname, setNickname] = useState(() => localStorage.getItem(LAST_NICKNAME_KEY) ?? "Claude Code"); @@ -786,6 +850,8 @@ function App() { const [awayDialogMessage, setAwayDialogMessage] = useState(""); const [awayPresets, setAwayPresets] = useState(() => loadAwayPresets()); const [extrasMenuOpen, setExtrasMenuOpen] = useState(false); + const [optionsDialogOpen, setOptionsDialogOpen] = useState(false); + const [optionsSection, setOptionsSection] = useState(OPTIONS_SECTIONS[0].id); const socketRef = useRef(null); const connectionsMenuRef = useRef(null); const favoritesMenuRef = useRef(null); @@ -1451,7 +1517,13 @@ function App() { Overwolf installieren
-