gaming-hub/electron/preload.js
Daniel 5eab3c1956 Add: Auto-Updater fuer Electron App
- Server: /updates Endpoint fuer Squirrel.Windows Update-Feed
- Electron: autoUpdater mit 30min Check-Intervall
- Preload: IPC-Events fuer Update-Status ans Frontend

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:45:27 +01:00

9 lines
367 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),
installUpdate: () => ipcRenderer.send('install-update'),
});