fix: avoid duplicate update status copy
Keep the availability subtitle exclusive to the pre-download state and show download, cancellation, and detailed failure status only below the progress track.
This commit is contained in:
+4
-9
@@ -7538,10 +7538,7 @@ function handleUpdateProgress(data) {
|
||||
_setUpdateDialogBusy(false);
|
||||
const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0;
|
||||
_setUpdateProgress(currentProgress, 'Download abgebrochen', 'aborted');
|
||||
if (message) {
|
||||
message.hidden = false;
|
||||
message.textContent = 'Download abgebrochen';
|
||||
}
|
||||
if (message) message.hidden = true;
|
||||
if (button) {
|
||||
button.disabled = false;
|
||||
button.textContent = 'Wiederholen';
|
||||
@@ -7551,11 +7548,9 @@ function handleUpdateProgress(data) {
|
||||
_updateInstallBusy = false;
|
||||
_setUpdateDialogBusy(false);
|
||||
const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0;
|
||||
_setUpdateProgress(currentProgress, 'Update fehlgeschlagen', 'error');
|
||||
if (message) {
|
||||
message.hidden = false;
|
||||
message.textContent = `Update fehlgeschlagen: ${String(progress.error || 'Unbekannter Fehler').slice(0, 400)}`;
|
||||
}
|
||||
const errorText = `Update fehlgeschlagen: ${String(progress.error || 'Unbekannter Fehler').slice(0, 400)}`;
|
||||
_setUpdateProgress(currentProgress, errorText, 'error');
|
||||
if (message) message.hidden = true;
|
||||
if (button) {
|
||||
button.disabled = false;
|
||||
button.textContent = 'Wiederholen';
|
||||
|
||||
@@ -2483,9 +2483,11 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
|
||||
|
||||
#updateProgressText {
|
||||
min-width: 34px;
|
||||
max-width: 100%;
|
||||
justify-self: end;
|
||||
color: var(--text-dim);
|
||||
font-size: 11px;
|
||||
line-height: 1.35;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -2488,8 +2488,8 @@ setTimeout(async () => {
|
||||
check('Update download progress is green, wide, and places its status below the line', busyUpdateState.progressState === 'downloading' && busyUpdateState.progressColor === 'rgb(117, 211, 155)' && busyUpdateState.progressTrackWidth >= 390 && busyUpdateState.progressTextTop >= busyUpdateState.progressTrackBottom);
|
||||
check('Busy update shows progress only below the bar', busyUpdateState.messageHidden === true && busyUpdateState.messageText === 'Update v9.9.9 verfügbar');
|
||||
|
||||
const updateErrorRecovery = await wc.executeJavaScript('handleUpdateProgress({ stage: "aborted", error: "Update abgebrochen" }); (() => { const bar = document.getElementById("updateProgressBar"); const state = [bar.style.width, bar.dataset.state, getComputedStyle(bar).backgroundColor].join("|"); document.getElementById("dismissUpdateBtn").click(); return state + "|" + document.getElementById("updateBanner").style.display + "|" + document.getElementById("updateCloseBtn").disabled + "|" + document.getElementById("dismissUpdateBtn").disabled + "|" + document.getElementById("headerUpdateBtn").hidden; })()');
|
||||
check('Canceled updates preserve progress in red and restore all close actions', updateErrorRecovery === '50%|aborted|rgb(255, 133, 140)|none|false|false|false');
|
||||
const updateErrorRecovery = await wc.executeJavaScript('handleUpdateProgress({ stage: "aborted", error: "Update abgebrochen" }); (() => { const bar = document.getElementById("updateProgressBar"); const state = [bar.style.width, bar.dataset.state, getComputedStyle(bar).backgroundColor, document.getElementById("updateMessage").hidden].join("|"); document.getElementById("dismissUpdateBtn").click(); return state + "|" + document.getElementById("updateBanner").style.display + "|" + document.getElementById("updateCloseBtn").disabled + "|" + document.getElementById("dismissUpdateBtn").disabled + "|" + document.getElementById("headerUpdateBtn").hidden; })()');
|
||||
check('Canceled updates show one status, preserve progress in red, and restore close actions', updateErrorRecovery === '50%|aborted|rgb(255, 133, 140)|true|none|false|false|false');
|
||||
|
||||
const initialInstallUpdateHandler = initialIpcHandlers.get('app:install-update');
|
||||
const initialUpdateQueueHandler = initialIpcHandlers.get('save-pending-queue');
|
||||
|
||||
Reference in New Issue
Block a user