fix: clear stale update metrics after cancellation
Hide downloaded size, throughput, and ETA once an update download is canceled while preserving the red progress position and cancellation status.
This commit is contained in:
@@ -7540,6 +7540,7 @@ function handleUpdateProgress(data) {
|
||||
_setUpdateDialogBusy(false);
|
||||
const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0;
|
||||
_setUpdateProgress(currentProgress, 'Download abgebrochen', 'aborted');
|
||||
_setUpdateProgressDetails(null);
|
||||
if (button) {
|
||||
button.disabled = false;
|
||||
button.textContent = 'Wiederholen';
|
||||
|
||||
+2
-2
@@ -2494,8 +2494,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 preserves the available version subtitle while progress stays below the bar', busyUpdateState.messageHidden === false && 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, document.getElementById("updateMessage").hidden, document.getElementById("updateMessage").textContent].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 the version subtitle, show one red status, and restore close actions', updateErrorRecovery === '50%|aborted|rgb(255, 133, 140)|false|Update v9.9.9 verfügbar|none|false|false|false');
|
||||
const updateErrorRecovery = await wc.executeJavaScript('handleUpdateProgress({ stage: "aborted", error: "Update abgebrochen" }); (() => { const bar = document.getElementById("updateProgressBar"); const details = document.getElementById("updateProgressDetails"); const state = [bar.style.width, bar.dataset.state, getComputedStyle(bar).backgroundColor, document.getElementById("updateMessage").hidden, document.getElementById("updateMessage").textContent, details.hidden, details.textContent].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 hide stale metrics, preserve the version subtitle, and show one red status', updateErrorRecovery === '50%|aborted|rgb(255, 133, 140)|false|Update v9.9.9 verfügbar|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