From 9316a4b4944a4ee4bca8d06f7e33f66477d4cb58 Mon Sep 17 00:00:00 2001 From: master3395 Date: Sun, 15 Feb 2026 01:16:01 +0100 Subject: [PATCH] Version management: fix upgrade polling, branch dropdown, log visibility - Fix ReferenceError: use $timeout instead of timeout, store timer for cancel - Add v2.5.5-dev to Select Branch dropdown (remove dev filter) - Limit branch list to latest 10 by version - Fix Upgrade Progress Log text visibility (light text on dark bg) --- .../baseTemplate/custom-js/system-status.js | 6 +- .../baseTemplate/versionManagment.html | 56 +++++++++++++------ .../baseTemplate/custom-js/system-status.js | 6 +- .../baseTemplate/custom-js/system-status.js | 6 +- 4 files changed, 51 insertions(+), 23 deletions(-) diff --git a/baseTemplate/static/baseTemplate/custom-js/system-status.js b/baseTemplate/static/baseTemplate/custom-js/system-status.js index 9afb9976d..f26ebe047 100644 --- a/baseTemplate/static/baseTemplate/custom-js/system-status.js +++ b/baseTemplate/static/baseTemplate/custom-js/system-status.js @@ -579,6 +579,7 @@ app.controller('versionManagment', function ($scope, $http, $timeout) { $scope.updateFinish = true; $scope.couldNotConnect = true; + var upgradeStatusTimer = null; $scope.upgrade = function () { @@ -660,7 +661,8 @@ app.controller('versionManagment', function ($scope, $http, $timeout) { if (response.data.upgradeStatus === 1) { if (response.data.finished === 1) { - $timeout.cancel(); + if (upgradeStatusTimer) $timeout.cancel(upgradeStatusTimer); + upgradeStatusTimer = null; $scope.upgradelogBox = false; $scope.upgradeLog = response.data.upgradeLog; $scope.upgradeLoading = true; @@ -672,7 +674,7 @@ app.controller('versionManagment', function ($scope, $http, $timeout) { } else { $scope.upgradelogBox = false; $scope.upgradeLog = response.data.upgradeLog; - timeout(getUpgradeStatus, 2000); + upgradeStatusTimer = $timeout(getUpgradeStatus, 2000); } } diff --git a/baseTemplate/templates/baseTemplate/versionManagment.html b/baseTemplate/templates/baseTemplate/versionManagment.html index b4b8a566a..202db35ec 100644 --- a/baseTemplate/templates/baseTemplate/versionManagment.html +++ b/baseTemplate/templates/baseTemplate/versionManagment.html @@ -199,9 +199,9 @@ word-break: break-all; } - /* Progress log */ + /* Progress log - dark background for terminal-style visibility */ .log-container { - background: var(--text-primary, #1e1e1e); + background: #1e1e1e; border-radius: 8px; padding: 20px; margin-top: 20px; @@ -215,11 +215,12 @@ min-height: 300px; background: transparent; border: none; - color: var(--bg-secondary, #f0f0f0); + color: #e8e8e8; font-family: 'SF Mono', Monaco, monospace; font-size: 13px; line-height: 1.6; resize: vertical; + caret-color: #e8e8e8; } .log-textarea:focus { @@ -337,30 +338,51 @@