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:
Sucukdeluxe
2026-08-21 00:06:21 +02:00
parent 5211372fc1
commit 4accf68915
3 changed files with 8 additions and 11 deletions
+4 -9
View File
@@ -7538,10 +7538,7 @@ function handleUpdateProgress(data) {
_setUpdateDialogBusy(false); _setUpdateDialogBusy(false);
const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0; const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0;
_setUpdateProgress(currentProgress, 'Download abgebrochen', 'aborted'); _setUpdateProgress(currentProgress, 'Download abgebrochen', 'aborted');
if (message) { if (message) message.hidden = true;
message.hidden = false;
message.textContent = 'Download abgebrochen';
}
if (button) { if (button) {
button.disabled = false; button.disabled = false;
button.textContent = 'Wiederholen'; button.textContent = 'Wiederholen';
@@ -7551,11 +7548,9 @@ function handleUpdateProgress(data) {
_updateInstallBusy = false; _updateInstallBusy = false;
_setUpdateDialogBusy(false); _setUpdateDialogBusy(false);
const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0; const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0;
_setUpdateProgress(currentProgress, 'Update fehlgeschlagen', 'error'); const errorText = `Update fehlgeschlagen: ${String(progress.error || 'Unbekannter Fehler').slice(0, 400)}`;
if (message) { _setUpdateProgress(currentProgress, errorText, 'error');
message.hidden = false; if (message) message.hidden = true;
message.textContent = `Update fehlgeschlagen: ${String(progress.error || 'Unbekannter Fehler').slice(0, 400)}`;
}
if (button) { if (button) {
button.disabled = false; button.disabled = false;
button.textContent = 'Wiederholen'; button.textContent = 'Wiederholen';
+2
View File
@@ -2483,9 +2483,11 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
#updateProgressText { #updateProgressText {
min-width: 34px; min-width: 34px;
max-width: 100%;
justify-self: end; justify-self: end;
color: var(--text-dim); color: var(--text-dim);
font-size: 11px; font-size: 11px;
line-height: 1.35;
text-align: right; text-align: right;
} }
+2 -2
View File
@@ -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('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'); 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; })()'); 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 preserve progress in red and restore all close actions', updateErrorRecovery === '50%|aborted|rgb(255, 133, 140)|none|false|false|false'); 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 initialInstallUpdateHandler = initialIpcHandlers.get('app:install-update');
const initialUpdateQueueHandler = initialIpcHandlers.get('save-pending-queue'); const initialUpdateQueueHandler = initialIpcHandlers.get('save-pending-queue');