1.1.3
This commit is contained in:
@@ -25,7 +25,13 @@ contextBridge.exposeInMainWorld('windowControls', {
|
||||
minimize: () => ipcRenderer.send('window-minimize'),
|
||||
maximize: () => ipcRenderer.send('window-maximize'),
|
||||
close: () => ipcRenderer.send('window-close'),
|
||||
flashFrame: () => ipcRenderer.send('flash-frame'),
|
||||
flashFrame: (on) => ipcRenderer.send('flash-frame', on !== false),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('notificationAPI', {
|
||||
show: (opts) => ipcRenderer.send('notification:show', opts),
|
||||
setBadge: (count) => ipcRenderer.send('notification:set-badge', count),
|
||||
flashFrame: (on) => ipcRenderer.send('flash-frame', on !== false),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('appSettings', {
|
||||
@@ -35,6 +41,13 @@ contextBridge.exposeInMainWorld('appSettings', {
|
||||
|
||||
contextBridge.exposeInMainWorld('updateAPI', {
|
||||
checkFlatpakUpdate: () => ipcRenderer.invoke('check-flatpak-update'),
|
||||
getStatus: () => ipcRenderer.invoke('update:get-status'),
|
||||
downloadAndInstall: () => ipcRenderer.invoke('update:download-and-install'),
|
||||
onStatusChanged: (callback) => {
|
||||
const handler = (_event, status) => callback(status);
|
||||
ipcRenderer.on('update:status', handler);
|
||||
return () => ipcRenderer.removeListener('update:status', handler);
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('sessionPersistence', {
|
||||
|
||||
Reference in New Issue
Block a user