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.
This commit is contained in:
@@ -7690,6 +7690,7 @@ function _setUpdateDialogBusy(busy, cancelable = false) {
|
|||||||
if (installButton) installButton.disabled = busy;
|
if (installButton) installButton.disabled = busy;
|
||||||
if (closeButton) closeButton.disabled = busy;
|
if (closeButton) closeButton.disabled = busy;
|
||||||
if (dismissButton) {
|
if (dismissButton) {
|
||||||
|
dismissButton.classList.toggle('update-cancel-button', Boolean(busy && cancelable));
|
||||||
dismissButton.disabled = Boolean(busy && (!cancelable || _updateCancelBusy));
|
dismissButton.disabled = Boolean(busy && (!cancelable || _updateCancelBusy));
|
||||||
dismissButton.textContent = busy && cancelable
|
dismissButton.textContent = busy && cancelable
|
||||||
? (_updateCancelBusy ? 'Abbrechen…' : 'Download abbrechen')
|
? (_updateCancelBusy ? 'Abbrechen…' : 'Download abbrechen')
|
||||||
|
|||||||
@@ -2484,6 +2484,18 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
|
|||||||
text-align: right;
|
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 {
|
.update-dialog-actions {
|
||||||
grid-column: 1 / -1;
|
grid-column: 1 / -1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
+2
-1
@@ -2470,6 +2470,7 @@ setTimeout(async () => {
|
|||||||
closeDisabled: document.getElementById('updateCloseBtn').disabled,
|
closeDisabled: document.getElementById('updateCloseBtn').disabled,
|
||||||
dismissDisabled: document.getElementById('dismissUpdateBtn').disabled,
|
dismissDisabled: document.getElementById('dismissUpdateBtn').disabled,
|
||||||
dismissText: document.getElementById('dismissUpdateBtn').textContent,
|
dismissText: document.getElementById('dismissUpdateBtn').textContent,
|
||||||
|
dismissDanger: document.getElementById('dismissUpdateBtn').classList.contains('update-cancel-button'),
|
||||||
headerHidden: header.hidden,
|
headerHidden: header.hidden,
|
||||||
messageHidden: document.getElementById('updateMessage').hidden,
|
messageHidden: document.getElementById('updateMessage').hidden,
|
||||||
messageText: document.getElementById('updateMessage').textContent,
|
messageText: document.getElementById('updateMessage').textContent,
|
||||||
@@ -2477,7 +2478,7 @@ setTimeout(async () => {
|
|||||||
progressText: progress.getAttribute('aria-valuetext')
|
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('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');
|
check('Busy update shows progress only below the bar', busyUpdateState.messageHidden === true && busyUpdateState.messageText === 'Update v9.9.9 verfügbar');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user