Refactor and code designing
This commit is contained in:
@@ -6,6 +6,9 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
maximizeWindow: () => ipcRenderer.send('window-maximize'),
|
||||
closeWindow: () => ipcRenderer.send('window-close'),
|
||||
|
||||
// Open URL in system default browser
|
||||
openExternal: (url) => ipcRenderer.invoke('open-external', url),
|
||||
|
||||
// Desktop capturer for screen sharing
|
||||
getSources: () => ipcRenderer.invoke('get-sources'),
|
||||
|
||||
@@ -18,7 +21,6 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
fileExists: (filePath) => ipcRenderer.invoke('file-exists', filePath),
|
||||
ensureDir: (dirPath) => ipcRenderer.invoke('ensure-dir', dirPath),
|
||||
|
||||
// ── Database operations (all SQL lives in main process) ───────────
|
||||
db: {
|
||||
initialize: () => ipcRenderer.invoke('db:initialize'),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user