From 98dca27ebefb62fa965c9edc7c908a931065a51d Mon Sep 17 00:00:00 2001 From: Eddy Date: Tue, 21 Apr 2026 09:11:34 +0200 Subject: [PATCH] fix: Update-Ladebalken erreicht jetzt sichtbar 100% MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Backend: Finales 100%-Progress-Event nach Download-Loop senden - Frontend: Explizit auf 100% setzen + 600ms Pause vor Bestätigungsdialog - Behebt visuellen Bug dass Balken bei ~97% stehen blieb [appimage] Co-Authored-By: Claude Opus 4.6 --- src-tauri/src/update.rs | 8 ++++++++ src/lib/components/UpdateDialog.svelte | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src-tauri/src/update.rs b/src-tauri/src/update.rs index 8594cc0..f2b260f 100644 --- a/src-tauri/src/update.rs +++ b/src-tauri/src/update.rs @@ -357,6 +357,14 @@ pub async fn download_update( app.emit("update-progress", &progress).ok(); } + // Finales 100%-Event senden damit die UI den Balken voll anzeigt + let final_progress = DownloadProgress { + downloaded, + total: if total_size > 0 { total_size } else { downloaded }, + percent: 100.0, + }; + app.emit("update-progress", &final_progress).ok(); + // SHA256 verifizieren (wenn erwartet) if let Some(expected) = expected_sha256 { let actual = format!("{:x}", hasher.finalize()); diff --git a/src/lib/components/UpdateDialog.svelte b/src/lib/components/UpdateDialog.svelte index dd13127..c631858 100644 --- a/src/lib/components/UpdateDialog.svelte +++ b/src/lib/components/UpdateDialog.svelte @@ -125,6 +125,9 @@ expectedSha256: updateInfo.sha256, }); console.log('Download abgeschlossen:', downloadedPath); + // Balken auf 100% setzen und kurz anzeigen bevor Bestätigung kommt + progress = { downloaded: progress?.total || 0, total: progress?.total || 0, percent: 100 }; + await new Promise(r => setTimeout(r, 600)); // NICHT sofort installieren — User-Bestätigung abwarten downloading = false; awaitingConfirmation = true;