This commit is contained in:
Bryan1029384756
2026-04-18 15:41:51 -05:00
parent 938df217f4
commit 593eaba82e
47 changed files with 3539 additions and 212 deletions

View File

@@ -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', {