Feat: Implement download cancellation feature with stop button and progress handling

This commit is contained in:
MasterAcnolo
2026-04-12 11:22:18 +02:00
parent d05b9e2511
commit 60137a15dc
7 changed files with 145 additions and 20 deletions

View File

@@ -13,6 +13,10 @@ function startProgress() {
speedElement.style.display = "block";
speedElement.innerHTML = "0 Mib/s";
// Show stop button
const stopBtn = document.getElementById("stopBtn");
if (stopBtn) stopBtn.style.display = "inline-block";
}
function updateProgress(percent) {
@@ -28,6 +32,10 @@ function resetProgress() {
speedElement.textContent = "0 Mib/s";
speedElement.style.display = "none";
// Hide stop button
const stopBtn = document.getElementById("stopBtn");
if (stopBtn) stopBtn.style.display = "none";
}
// SSE Connexion