From 67e8c3617a9334f4a75f284a4d3856cb24bf3957 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Tue, 12 May 2026 15:10:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20console=20status=20display=20=E2=80=94?= =?UTF-8?q?=20task=20info=20overridden=20by=20msg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/ui/templates/console.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/web/ui/templates/console.html b/internal/web/ui/templates/console.html index 5cfcfc7..e0e632b 100644 --- a/internal/web/ui/templates/console.html +++ b/internal/web/ui/templates/console.html @@ -378,14 +378,13 @@ // Show saved task info and auto-refresh from URL param (function() { var m = location.search.match(/[?&]task=([^&]+)/); - if (m) { - document.getElementById('console-status').innerHTML = '⏳ 任务 ' + m[1].substring(0,8) + ' 执行中,页面将自动刷新...'; - setTimeout(function(){ location.href = '/ui/console'; }, 6000); - } var msg = location.search.match(/[?&]msg=([^&]+)/); - if (msg) { + if (m) { + document.getElementById('console-status').innerHTML = '⏳ 任务 ' + m[1].substring(0,8) + ' 执行中,' + (msg ? decodeURIComponent(msg[1]) : '页面将自动刷新...'); + setTimeout(function(){ location.href = '/ui/console'; }, 8000); + } else if (msg) { document.getElementById('console-status').innerHTML = decodeURIComponent(msg[1]); - if (!m) setTimeout(function(){ document.getElementById('console-status').innerHTML = ''; }, 5000); + setTimeout(function(){ document.getElementById('console-status').innerHTML = ''; }, 5000); } })(); })();