fix(updater): show header action only when update is available

Hide the header update action until a newer release is confirmed.
Register update notifications before renderer initialization so startup cannot miss them.
Refresh the public product screenshot and release metadata for v2.0.7.
This commit is contained in:
Sucukdeluxe
2026-08-10 13:11:14 +02:00
parent 76a228fb7c
commit 9444bf1351
10 changed files with 68 additions and 32 deletions
+3 -4
View File
@@ -369,10 +369,6 @@ async function init() {
if (versionLabel) versionLabel.textContent = `v${version}`;
} catch {}
// Update listeners
window.api.onUpdateAvailable(showUpdateBanner);
window.api.onUpdateProgress(handleUpdateProgress);
window.api.onUploadProgress((data) => {
handleProgress(data);
});
@@ -660,6 +656,7 @@ function _syncHeaderUpdateState() {
? `Update v${version || 'unbekannt'} verfügbar. Klicken zum Installieren.`
: 'Nach Aktualisierungen suchen';
if (button) {
button.hidden = !available;
button.classList.toggle('update-available', available);
button.classList.toggle('is-checking', _updateCheckBusy);
button.disabled = _updateCheckBusy;
@@ -6734,6 +6731,8 @@ function updateStatsPanel() {
}
// --- Start ---
window.api.onUpdateAvailable(showUpdateBanner);
window.api.onUpdateProgress(handleUpdateProgress);
window.api.onPrepareClose(prepareForWindowClose);
init().then(() => {
window.api.signalCloseHandshakeReady();