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:10:39 +02:00
parent d86caa0b1e
commit 761b5e27db
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();
+1 -1
View File
@@ -53,7 +53,7 @@
</div>
<div class="header-spacer" aria-hidden="true"></div>
<div class="header-cluster header-utilities">
<button class="header-update-button" id="headerUpdateBtn" title="Nach Aktualisierungen suchen" aria-label="Nach Aktualisierungen suchen" data-tooltip="Nach Aktualisierungen suchen">
<button class="header-update-button" id="headerUpdateBtn" title="Nach Aktualisierungen suchen" aria-label="Nach Aktualisierungen suchen" data-tooltip="Nach Aktualisierungen suchen" hidden>
<svg class="header-action-icon" aria-hidden="true"><use href="#icon-download"></use></svg>
<span class="header-update-label">Update</span>
</button>
+4
View File
@@ -1772,6 +1772,10 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
transition: background-color .14s, transform .14s;
}
.header-update-button[hidden] {
display: none;
}
.header-update-button::after {
content: attr(data-tooltip);
position: absolute;