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:
+3
-4
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user