feat(desktop): add secure electron shell with preload ipc and menu

This commit is contained in:
nav
2026-05-12 16:13:05 +00:00
parent 292d8c27f2
commit 5843d3f8ca
3 changed files with 104 additions and 3 deletions

7
preload.js Normal file
View 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 }),
})