From 82ad5db7a5998167bb19303a02b966c675158fc3 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe <259325684+Sucukdeluxe@users.noreply.github.com> Date: Fri, 21 Aug 2026 00:01:03 +0200 Subject: [PATCH] style: emphasize update download cancellation Render the active download cancellation action with a red background and black text, retaining the danger styling while cancellation is pending. --- renderer/app.js | 1 + renderer/styles.css | 12 ++++++++++++ tests/ui-smoke.js | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/renderer/app.js b/renderer/app.js index 26bda6e..a1bffee 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -7690,6 +7690,7 @@ function _setUpdateDialogBusy(busy, cancelable = false) { if (installButton) installButton.disabled = busy; if (closeButton) closeButton.disabled = busy; if (dismissButton) { + dismissButton.classList.toggle('update-cancel-button', Boolean(busy && cancelable)); dismissButton.disabled = Boolean(busy && (!cancelable || _updateCancelBusy)); dismissButton.textContent = busy && cancelable ? (_updateCancelBusy ? 'Abbrechen…' : 'Download abbrechen') diff --git a/renderer/styles.css b/renderer/styles.css index 5fdbb98..063e9b2 100644 --- a/renderer/styles.css +++ b/renderer/styles.css @@ -2484,6 +2484,18 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; } text-align: right; } +#dismissUpdateBtn.update-cancel-button { + border-color: transparent; + background: var(--danger); + color: #000; +} + +#dismissUpdateBtn.update-cancel-button:hover { + border-color: transparent; + background: color-mix(in srgb, var(--danger) 82%, #fff); + color: #000; +} + .update-dialog-actions { grid-column: 1 / -1; display: flex; diff --git a/tests/ui-smoke.js b/tests/ui-smoke.js index d3313ed..433c443 100644 --- a/tests/ui-smoke.js +++ b/tests/ui-smoke.js @@ -2470,6 +2470,7 @@ setTimeout(async () => { closeDisabled: document.getElementById('updateCloseBtn').disabled, dismissDisabled: document.getElementById('dismissUpdateBtn').disabled, dismissText: document.getElementById('dismissUpdateBtn').textContent, + dismissDanger: document.getElementById('dismissUpdateBtn').classList.contains('update-cancel-button'), headerHidden: header.hidden, messageHidden: document.getElementById('updateMessage').hidden, messageText: document.getElementById('updateMessage').textContent, @@ -2477,7 +2478,7 @@ setTimeout(async () => { progressText: progress.getAttribute('aria-valuetext') }; })()\`); - check('Busy update keeps its progress dialog open with download cancellation available', busyUpdateState.display === 'flex' && busyUpdateState.hidden === 'false' && busyUpdateState.closeDisabled === true && busyUpdateState.dismissDisabled === false && busyUpdateState.dismissText === 'Download abbrechen' && busyUpdateState.headerHidden === false); + check('Busy update keeps its progress dialog open with a dangerous download cancellation action', busyUpdateState.display === 'flex' && busyUpdateState.hidden === 'false' && busyUpdateState.closeDisabled === true && busyUpdateState.dismissDisabled === false && busyUpdateState.dismissText === 'Download abbrechen' && busyUpdateState.dismissDanger === true && busyUpdateState.headerHidden === false); check('Update progress exposes an accessible live value', busyUpdateState.progressLabel === 'Update-Fortschritt' && busyUpdateState.progressText === 'Download 50%'); check('Busy update shows progress only below the bar', busyUpdateState.messageHidden === true && busyUpdateState.messageText === 'Update v9.9.9 verfügbar');