aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components/SettingsPage.tsx
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-03-04 22:33:27 -0800
committerbndw <ben@bdw.to>2026-03-04 22:33:27 -0800
commit27b6e3499d1c96982c67e445a8ee2fcbb16d9b9f (patch)
tree97cd610caf8e337ff9ce0a8a21695b7c0babc9cb /renderer/src/components/SettingsPage.tsx
parent712b7ce8306d8bf5b21f35aa51957a82fa771e3b (diff)
feat: Remove auto-send block from handleConfirmNewSession in App.tsx
- ✅ Remove auto-send block from handleConfirmNewSession in App.tsx
Diffstat (limited to 'renderer/src/components/SettingsPage.tsx')
-rw-r--r--renderer/src/components/SettingsPage.tsx33
1 files changed, 30 insertions, 3 deletions
diff --git a/renderer/src/components/SettingsPage.tsx b/renderer/src/components/SettingsPage.tsx
index 7d06547..0c0c2e8 100644
--- a/renderer/src/components/SettingsPage.tsx
+++ b/renderer/src/components/SettingsPage.tsx
@@ -4,15 +4,18 @@ import { GitSettings } from "./settings/GitSettings";
4import { ModelSettings } from "./settings/ModelSettings"; 4import { ModelSettings } from "./settings/ModelSettings";
5import { McpSettings } from "./settings/McpSettings"; 5import { McpSettings } from "./settings/McpSettings";
6 6
7type SettingsSection = "model" | "mcp" | "system-prompts" | "git"; 7type Theme = "dark" | "light";
8type SettingsSection = "appearance" | "model" | "mcp" | "system-prompts" | "git";
8 9
9interface SettingsPageProps { 10interface SettingsPageProps {
10 onClose: () => void; 11 onClose: () => void;
12 theme: Theme;
13 onToggleTheme: () => void;
11} 14}
12 15
13export function SettingsPage({ onClose }: SettingsPageProps) { 16export function SettingsPage({ onClose, theme, onToggleTheme }: SettingsPageProps) {
14 const [activeSection, setActiveSection] = 17 const [activeSection, setActiveSection] =
15 useState<SettingsSection>("model"); 18 useState<SettingsSection>("appearance");
16 19
17 return ( 20 return (
18 <div className="settings-overlay"> 21 <div className="settings-overlay">
@@ -35,6 +38,14 @@ export function SettingsPage({ onClose }: SettingsPageProps) {
35 <nav className="settings-nav"> 38 <nav className="settings-nav">
36 <button 39 <button
37 className={`settings-nav-item${ 40 className={`settings-nav-item${
41 activeSection === "appearance" ? " active" : ""
42 }`}
43 onClick={() => setActiveSection("appearance")}
44 >
45 Appearance
46 </button>
47 <button
48 className={`settings-nav-item${
38 activeSection === "model" ? " active" : "" 49 activeSection === "model" ? " active" : ""
39 }`} 50 }`}
40 onClick={() => setActiveSection("model")} 51 onClick={() => setActiveSection("model")}
@@ -69,6 +80,22 @@ export function SettingsPage({ onClose }: SettingsPageProps) {
69 80
70 {/* Content */} 81 {/* Content */}
71 <div className="settings-content"> 82 <div className="settings-content">
83 {activeSection === "appearance" && (
84 <div>
85 <div className="settings-section-title">Theme</div>
86 <div className="settings-section-desc">
87 Choose between light and dark mode.
88 </div>
89 <div className="settings-toggle-row">
90 <span className="settings-toggle-label">
91 {theme === "dark" ? "Dark" : "Light"}
92 </span>
93 <button className="btn-secondary" onClick={onToggleTheme}>
94 Switch to {theme === "dark" ? "Light" : "Dark"} mode
95 </button>
96 </div>
97 </div>
98 )}
72 {activeSection === "model" && <ModelSettings />} 99 {activeSection === "model" && <ModelSettings />}
73 {activeSection === "mcp" && <McpSettings />} 100 {activeSection === "mcp" && <McpSettings />}
74 {activeSection === "system-prompts" && <SystemPromptsSettings />} 101 {activeSection === "system-prompts" && <SystemPromptsSettings />}