- Modal-Overlay statt Banner fuer Update-Benachrichtigung - 3 Zustaende: Downloading (Ladeanimation), Ready (OK-Button), Error - IPC-Events: update-available, update-ready, update-error
11 lines
532 B
JavaScript
11 lines
532 B
JavaScript
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('electronAPI', {
|
|
isElectron: true,
|
|
version: '1.5.0',
|
|
onUpdateAvailable: (callback) => ipcRenderer.on('update-available', callback),
|
|
onUpdateReady: (callback) => ipcRenderer.on('update-ready', callback),
|
|
onUpdateError: (callback) => ipcRenderer.on('update-error', (_e, msg) => callback(msg)),
|
|
installUpdate: () => ipcRenderer.send('install-update'),
|
|
setStreaming: (active) => ipcRenderer.send('streaming-status', active),
|
|
});
|