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:
parent
06ab7f523b
commit
7ef4eefc55
3 changed files with 52 additions and 1 deletions
|
|
@ -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', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue