fix(ui): status page — fix download link path, connection-lost re-show

This commit is contained in:
jetson committed 2026-09-17 16:09:33 +07:00
1 parent 63235832d6
commit 1d35c285da
1 file changed
+3 -2
+3 -2
View File
@@ -227,7 +227,7 @@ function initStatusPage(jobId, initialStatus) {
.then(function (res) { return res.json(); })
.then(function (data) {
consecutiveFailures = 0;
if (connectionLostIndicator) { connectionLostIndicator.style.display = 'none'; }
if (connectionLostIndicator) { connectionLostIndicator.style.display = 'none'; connectionLostIndicator = null; }
updateProgressBar(data.progress || 0);
updateStatusBadge(data.status);
updateModelName(data.current_model);
@@ -324,7 +324,8 @@ function initStatusPage(jobId, initialStatus) {
'<span class="meta-item"><strong>Duration:</strong> ' + (r.duration_seconds || 0).toFixed(1) + 's</span>' +
'</div>';
if (r.output_path) {
card.innerHTML += '<a href="/download/' + jobId + '/' + escapeHtml(r.output_path) + '" class="btn btn-primary result-download">Download</a>';
var filename = r.output_path.split('/').pop();
card.innerHTML += '<a href="/download/' + jobId + '/' + escapeHtml(filename) + '" class="btn btn-primary result-download">Download</a>';
}
resultsGrid.appendChild(card);
});