diff options
| author | bndw <ben@bdw.to> | 2026-02-28 21:35:39 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-02-28 21:35:39 -0800 |
| commit | 0484d97dfbc3b8a2e7878d3ab35a9895decdf467 (patch) | |
| tree | cdc6fffe8b169c83058e8d64ca42723f6ccb6dcf /renderer/src/components/SettingsPage.tsx | |
| parent | 04c63d4ef601876186e5d7fab980d76575c494ec (diff) | |
feat: **1 — `git.ts`:** Add exported `getCurrentBranch` helpe… (+8 more)
- ✅ **1 — `git.ts`:** Add exported `getCurrentBranch` helper after `ensureGitRepo`
- ✅ **2a — `ipc/handlers.ts`:** Update git import to include `ensureGitRepo` and `getCurrentBranch`
- ✅ **2b — `ipc/handlers.ts`:** Replace `workflow:advance` implement-phase block with branching-toggle logic
- ✅ **3 — `GitSettings.tsx`:** Create new settings component with pill toggle
- ✅ **4 — `SettingsPage.tsx`:** Add `"git"` section type, import, nav item, content render; fix both unicode glyphs
- ✅ **5 — `globals.css`:** Append toggle-row + pill toggle + maximize-btn CSS
- ✅ **6 — `index.ts`:** Add `ipcMain` to import; add `window:toggleMaximize` handler + maximize/unmaximize events inside `createWindow()`
- ✅ **7 — `preload.ts`:** Add `toggleMaximize` + `onWindowMaximized` to interface and `api` object
- ✅ **8 — `Header.tsx`:** Add `isMaximized` state + effect + maximize button in JSX
Diffstat (limited to 'renderer/src/components/SettingsPage.tsx')
| -rw-r--r-- | renderer/src/components/SettingsPage.tsx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/renderer/src/components/SettingsPage.tsx b/renderer/src/components/SettingsPage.tsx index 5267665..9ebde44 100644 --- a/renderer/src/components/SettingsPage.tsx +++ b/renderer/src/components/SettingsPage.tsx | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | import React, { useState } from "react"; | 1 | import React, { useState } from "react"; |
| 2 | import { SystemPromptsSettings } from "./settings/SystemPromptsSettings"; | 2 | import { SystemPromptsSettings } from "./settings/SystemPromptsSettings"; |
| 3 | import { GitSettings } from "./settings/GitSettings"; | ||
| 3 | 4 | ||
| 4 | type SettingsSection = "system-prompts"; | 5 | type SettingsSection = "system-prompts" | "git"; |
| 5 | 6 | ||
| 6 | interface SettingsPageProps { | 7 | interface SettingsPageProps { |
| 7 | onClose: () => void; | 8 | onClose: () => void; |
| @@ -16,14 +17,14 @@ export function SettingsPage({ onClose }: SettingsPageProps) { | |||
| 16 | {/* Header — matches the main app header height/style */} | 17 | {/* Header — matches the main app header height/style */} |
| 17 | <div className="settings-header"> | 18 | <div className="settings-header"> |
| 18 | <div className="settings-header-left"> | 19 | <div className="settings-header-left"> |
| 19 | <span className="settings-title">\u2699 Settings</span> | 20 | <span className="settings-title">{'⚙'} Settings</span> |
| 20 | </div> | 21 | </div> |
| 21 | <button | 22 | <button |
| 22 | className="settings-close" | 23 | className="settings-close" |
| 23 | onClick={onClose} | 24 | onClick={onClose} |
| 24 | title="Close settings" | 25 | title="Close settings" |
| 25 | > | 26 | > |
| 26 | \u00d7 | 27 | {'×'} |
| 27 | </button> | 28 | </button> |
| 28 | </div> | 29 | </div> |
| 29 | 30 | ||
| @@ -38,12 +39,20 @@ export function SettingsPage({ onClose }: SettingsPageProps) { | |||
| 38 | > | 39 | > |
| 39 | System Prompts | 40 | System Prompts |
| 40 | </button> | 41 | </button> |
| 41 | {/* Future sections added here */} | 42 | <button |
| 43 | className={`settings-nav-item${ | ||
| 44 | activeSection === "git" ? " active" : "" | ||
| 45 | }`} | ||
| 46 | onClick={() => setActiveSection("git")} | ||
| 47 | > | ||
| 48 | Git | ||
| 49 | </button> | ||
| 42 | </nav> | 50 | </nav> |
| 43 | 51 | ||
| 44 | {/* Content */} | 52 | {/* Content */} |
| 45 | <div className="settings-content"> | 53 | <div className="settings-content"> |
| 46 | {activeSection === "system-prompts" && <SystemPromptsSettings />} | 54 | {activeSection === "system-prompts" && <SystemPromptsSettings />} |
| 55 | {activeSection === "git" && <GitSettings />} | ||
| 47 | </div> | 56 | </div> |
| 48 | </div> | 57 | </div> |
| 49 | </div> | 58 | </div> |
