mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 09:28:14 +00:00
12 lines
482 B
JavaScript
12 lines
482 B
JavaScript
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('homeagent', {
|
|
connections: {
|
|
list: () => ipcRenderer.invoke('connections:list'),
|
|
add: (conn) => ipcRenderer.invoke('connections:add', conn),
|
|
update: (id, updates) => ipcRenderer.invoke('connections:update', { id, updates }),
|
|
delete: (id) => ipcRenderer.invoke('connections:delete', id),
|
|
setCurrent: (id) => ipcRenderer.invoke('connections:setCurrent', id),
|
|
},
|
|
});
|