- 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
10 lines
367 B
JavaScript
10 lines
367 B
JavaScript
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));
|
|
},
|
|
});
|