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 /src/main/preload.ts | |
| 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 'src/main/preload.ts')
| -rw-r--r-- | src/main/preload.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/preload.ts b/src/main/preload.ts index 52e947b..44467db 100644 --- a/src/main/preload.ts +++ b/src/main/preload.ts | |||
| @@ -62,6 +62,10 @@ export interface ClaudeFlowAPI { | |||
| 62 | 62 | ||
| 63 | // Dialogs | 63 | // Dialogs |
| 64 | selectDirectory: () => Promise<string | null>; | 64 | selectDirectory: () => Promise<string | null>; |
| 65 | |||
| 66 | // Window | ||
| 67 | toggleMaximize: () => Promise<void>; | ||
| 68 | onWindowMaximized: (cb: (isMaximized: boolean) => void) => () => void; | ||
| 65 | } | 69 | } |
| 66 | 70 | ||
| 67 | const api: ClaudeFlowAPI = { | 71 | const api: ClaudeFlowAPI = { |
| @@ -127,6 +131,14 @@ const api: ClaudeFlowAPI = { | |||
| 127 | const result = await ipcRenderer.invoke("dialog:selectDirectory"); | 131 | const result = await ipcRenderer.invoke("dialog:selectDirectory"); |
| 128 | return result; | 132 | return result; |
| 129 | }, | 133 | }, |
| 134 | |||
| 135 | // Window | ||
| 136 | toggleMaximize: () => ipcRenderer.invoke("window:toggleMaximize"), | ||
| 137 | onWindowMaximized: (cb) => { | ||
| 138 | const handler = (_: IpcRendererEvent, val: boolean) => cb(val); | ||
| 139 | ipcRenderer.on("window:maximized", handler); | ||
| 140 | return () => ipcRenderer.removeListener("window:maximized", handler); | ||
| 141 | }, | ||
| 130 | }; | 142 | }; |
| 131 | 143 | ||
| 132 | contextBridge.exposeInMainWorld("api", api); | 144 | contextBridge.exposeInMainWorld("api", api); |
