Configurable action buttons with preset templates
Convert the hardcoded Claude / Visual Studio / Redeploy buttons into a configurable action-button system with an editor UI. - New config field actions[] with kinds: terminal, detached, open (open uses Windows shell association — used by the .sln preset) - requiresFile supports * globs (e.g. *.sln matches solution files) - Migration seeds Claude + Visual Studio + Redeploy on first run, with a one-time vsActionBackfilled pass to add VS to users who already migrated under the previous two-seed flow - ActionEditor modal: list with reorder/edit/delete, add form with preset dropdown (Claude, Visual Studio, VS Code, Cursor, Run 1ReDeploy.bat, Commit & Push) and a curated icon dropdown plus free-text override - runAction IPC dispatches by kind; isCommandAvailable generalizes the per-CLI PATH probe used to disable buttons whose CLI is missing - Built-in VS button removed from BookmarkRow + MinimizedList; Claude visibility toggle removed from settings (now an editable action) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -27,7 +27,7 @@ contextBridge.exposeInMainWorld('bookmarks', {
|
||||
|
||||
// Folder picking + inspection
|
||||
pickFolder: () => ipcRenderer.invoke('pick-folder'),
|
||||
inspectFolder: (path) => ipcRenderer.invoke('inspect-folder', path),
|
||||
inspectFolder: (path, actionFiles) => ipcRenderer.invoke('inspect-folder', path, actionFiles),
|
||||
|
||||
// Launchers
|
||||
openInExplorer: (path) => ipcRenderer.invoke('open-in-explorer', path),
|
||||
@@ -37,6 +37,8 @@ contextBridge.exposeInMainWorld('bookmarks', {
|
||||
runRedeploy: (path) => ipcRenderer.invoke('run-redeploy', path),
|
||||
copyPath: (text) => ipcRenderer.invoke('copy-path', text),
|
||||
isClaudeAvailable: () => ipcRenderer.invoke('is-claude-available'),
|
||||
isCommandAvailable: (name) => ipcRenderer.invoke('is-command-available', name),
|
||||
runAction: (payload) => ipcRenderer.invoke('run-action', payload),
|
||||
|
||||
// Window
|
||||
setPinned: (value) => ipcRenderer.invoke('set-pinned', value),
|
||||
@@ -47,6 +49,7 @@ contextBridge.exposeInMainWorld('bookmarks', {
|
||||
// Settings
|
||||
setButtonVisibility: (payload) => ipcRenderer.invoke('set-button-visibility', payload),
|
||||
setAutoStart: (value) => ipcRenderer.invoke('set-auto-start', value),
|
||||
setActions: (list) => ipcRenderer.invoke('set-actions', list),
|
||||
|
||||
// Events from main → renderer
|
||||
onConfigUpdated: (cb) => {
|
||||
|
||||
Reference in New Issue
Block a user