From b33b274751f376621fb42f595407afd9085221c6 Mon Sep 17 00:00:00 2001 From: xRangerDE Date: Mon, 11 May 2026 10:32:57 +0200 Subject: [PATCH] cleanup: update banner + progress use class-based visibility (.show / .is-hidden) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .update-banner CSS has had a .show modifier (display:flex) defined since the original auto-updater code, but the JS was bypassing it and setting .style.display='flex'/'none' directly. Three places had this inconsistency: - showUpdateBanner() — set inline display:flex - hideUpdateBanner() — set inline display:none - The check at line 461 — read inline display === 'flex' to gate a "no update found" toast Switched all three to the canonical .show class — adding/removing it and checking with classList.contains. The CSS rule does the actual display flip. The updateProgress wrap (download progress bar inside the banner) was using the same .style.display = 'block' / 'none' inline-toggle pattern in three places (setUpdateBannerAvailableUi, setDownloadPendingUi, setDownloadReadyUi). Migrated all three to the shared .is-hidden class from 4.6.134, plus removed the inline style="display: none;" from the HTML. Net: 5 inline display assignments + 1 state read + 1 inline HTML display:none gone, update-banner state machine is now fully class-driven. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/index.html | 2 +- src/renderer-updates.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.html b/src/index.html index eb8751c..67639f9 100644 --- a/src/index.html +++ b/src/index.html @@ -10,7 +10,7 @@
Neue Version verfügbar! -