Add: Update-Dialog fuer Electron Auto-Updater

- main.js: IPC-Events an Renderer senden wenn Update bereit
- main.js: install-update IPC Handler (quitAndInstall)
- App.tsx: Update-Banner "Neues Update verfuegbar!" mit Restart-Button
- styles.css: Update-Bar Styling passend zum Design-System

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-07 13:53:26 +01:00
parent 06ab7f523b
commit 7ef4eefc55
3 changed files with 52 additions and 1 deletions

View file

@ -1,4 +1,4 @@
const { app, BrowserWindow, session, shell, desktopCapturer, autoUpdater, dialog } = require('electron');
const { app, BrowserWindow, session, shell, desktopCapturer, autoUpdater, dialog, ipcMain } = require('electron');
const path = require('path');
const { setupAdBlocker } = require('./ad-blocker');
@ -28,6 +28,12 @@ function setupAutoUpdater() {
autoUpdater.on('update-downloaded', (_event, releaseNotes, releaseName) => {
console.log('[AutoUpdater] Update downloaded:', releaseName || 'new version');
if (mainWindow) mainWindow.webContents.send('update-ready');
});
// Handle install-update request from renderer
ipcMain.on('install-update', () => {
autoUpdater.quitAndInstall();
});
autoUpdater.on('update-not-available', () => {