From cd94900f027c38739e6e9e540cf23a77c74e1e84 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 25 Jan 2026 23:53:08 +0000 Subject: [PATCH] fix(upload): improve error feedback in UploadModal - Keep progress bar visible on upload failure - Style error status text with `text-critical` - Set generated link inputs to "Upload Failed" to clearly indicate failure - Reset error state on retry --- js/ui/components/UploadModal.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/js/ui/components/UploadModal.js b/js/ui/components/UploadModal.js index db277be4..ad480151 100644 --- a/js/ui/components/UploadModal.js +++ b/js/ui/components/UploadModal.js @@ -479,6 +479,12 @@ export class UploadModal { // Start new session const currentUploadId = ++this.videoUploadId; + // Reset UI classes + if (this.statusText.uploadMain) { + this.statusText.uploadMain.classList.remove("text-critical"); + this.statusText.uploadMain.classList.add("text-text"); + } + // Reset Video State this.videoUploadState = { status: 'uploading', @@ -630,9 +636,18 @@ export class UploadModal { userLogger.error("Video upload sequence failed:", err); this.videoUploadState.status = 'error'; this.updateVideoProgress(null, "Upload failed."); + + if (this.statusText.uploadMain) { + this.statusText.uploadMain.classList.remove("text-text"); + this.statusText.uploadMain.classList.add("text-critical"); + } + + if (this.results.videoUrl) this.results.videoUrl.value = "Upload Failed"; + if (this.results.magnet) this.results.magnet.value = "Upload Failed"; + if (this.results.torrentUrl) this.results.torrentUrl.value = "Upload Failed"; + alert(`Upload failed: ${err.message}`); - this.sourceSections.progress.classList.add("hidden"); this.inputs.file.value = ""; // Reset } }