feat(desktop): add secure electron shell with preload ipc and menu
This commit is contained in:
7
preload.js
Normal file
7
preload.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
|
||||
contextBridge.exposeInMainWorld('fabricDesktop', {
|
||||
getConfig: () => ipcRenderer.invoke('fabric:config:get'),
|
||||
setConfig: (next) => ipcRenderer.invoke('fabric:config:set', next),
|
||||
notify: (title, body) => ipcRenderer.invoke('fabric:notify', { title, body }),
|
||||
})
|
||||
Reference in New Issue
Block a user