feat: add Electron support for headless exe service
- Add folder selection button in UI - Add Electron main process with IPC handlers - Support --port and --docs command line arguments - Support --headless mode for headless service - Add portable exe build configuration
This commit is contained in:
9
electron/preload.mjs
Normal file
9
electron/preload.mjs
Normal file
@@ -0,0 +1,9 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
selectFolder: () => ipcRenderer.invoke('select-folder'),
|
||||
getDocsPath: () => ipcRenderer.invoke('get-docs-path'),
|
||||
onDocsPathChanged: (callback: (path: string) => void) => {
|
||||
ipcRenderer.on('docs-path-changed', (_event, path) => callback(path));
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user