mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-05-06 07:26:48 +00:00
@@ -13,7 +13,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
notification: {
|
||||
show: (data: any) => ipcRenderer.invoke('notification:show', data),
|
||||
close: () => ipcRenderer.invoke('notification:close'),
|
||||
click: (sessionId: string) => ipcRenderer.send('notification-clicked', sessionId),
|
||||
click: (payload: any) => ipcRenderer.send('notification-clicked', payload),
|
||||
ready: () => ipcRenderer.send('notification:ready'),
|
||||
resize: (width: number, height: number) => ipcRenderer.send('notification:resize', { width, height }),
|
||||
onShow: (callback: (event: any, data: any) => void) => {
|
||||
@@ -24,6 +24,11 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
const listener = (_: any, sessionId: string) => callback(sessionId)
|
||||
ipcRenderer.on('navigate-to-session', listener)
|
||||
return () => ipcRenderer.removeListener('navigate-to-session', listener)
|
||||
},
|
||||
onNavigateToRoute: (callback: (route: string) => void) => {
|
||||
const listener = (_: any, route: string) => callback(route)
|
||||
ipcRenderer.on('navigate-to-route', listener)
|
||||
return () => ipcRenderer.removeListener('navigate-to-route', listener)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -573,6 +578,10 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
insight: {
|
||||
testConnection: () => ipcRenderer.invoke('insight:testConnection'),
|
||||
getTodayStats: () => ipcRenderer.invoke('insight:getTodayStats'),
|
||||
listRecords: (filters?: any) => ipcRenderer.invoke('insight:listRecords', filters),
|
||||
getRecord: (id: string) => ipcRenderer.invoke('insight:getRecord', id),
|
||||
markRecordRead: (id: string) => ipcRenderer.invoke('insight:markRecordRead', id),
|
||||
clearRecords: (filters?: any) => ipcRenderer.invoke('insight:clearRecords', filters),
|
||||
triggerTest: () => ipcRenderer.invoke('insight:triggerTest'),
|
||||
generateFootprintInsight: (payload: {
|
||||
rangeLabel: string
|
||||
|
||||
Reference in New Issue
Block a user