From e4e4edd31b0484b33ac37465b3c311c589115189 Mon Sep 17 00:00:00 2001
From: tian <11429339@qq.com>
Date: Wed, 6 May 2026 16:33:39 +0800
Subject: [PATCH] style: restore system page, service status with info-list and
inline color
---
internal/web/ui/templates/system.html | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/internal/web/ui/templates/system.html b/internal/web/ui/templates/system.html
index c13288d..a133fa0 100644
--- a/internal/web/ui/templates/system.html
+++ b/internal/web/ui/templates/system.html
@@ -26,9 +26,9 @@
{{icon "heartbeat"}}服务状态
-
-
管理后台 检测中…
-
接口状态 检测中…
+
@@ -43,39 +43,39 @@
function check() {
svcEl.textContent = "检测中…";
- svcEl.className = "pill";
+ svcEl.style.color = "";
apiEl.textContent = "检测中…";
- apiEl.className = "pill";
+ apiEl.style.color = "";
fetch("/health")
.then(function(r) { return r.text(); })
.then(function(t) {
if (t.indexOf("ok") !== -1) {
svcEl.textContent = "运行正常";
- svcEl.className = "pill ok";
+ svcEl.style.color = "var(--green)";
} else {
svcEl.textContent = "异常";
- svcEl.className = "pill bad";
+ svcEl.style.color = "var(--danger-soft-text)";
}
})
.catch(function() {
svcEl.textContent = "无法连接";
- svcEl.className = "pill bad";
+ svcEl.style.color = "var(--danger-soft-text)";
});
fetch("/openapi.json")
.then(function(r) {
if (r.ok) {
apiEl.textContent = "正常";
- apiEl.className = "pill ok";
+ apiEl.style.color = "var(--green)";
} else {
apiEl.textContent = "异常 (" + r.status + ")";
- apiEl.className = "pill bad";
+ apiEl.style.color = "var(--danger-soft-text)";
}
})
.catch(function() {
apiEl.textContent = "无法连接";
- apiEl.className = "pill bad";
+ apiEl.style.color = "var(--danger-soft-text)";
});
}