From 623666875d8d207b4908bb91f5851b9e3caa8672 Mon Sep 17 00:00:00 2001
From: jinghui <181050043@qq.com>
Date: Mon, 26 Oct 2026 18:02:35 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BE=A7=E6=A0=8F=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=97=B6=E9=97=B4=EF=BC=8C=E4=BE=BF=E4=BA=8E?=
=?UTF-8?q?=E7=A1=AE=E8=AE=A4=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.md | 5 +++++
public/app.js | 6 ++++++
public/index.html | 1 +
public/style.css | 1 +
4 files changed, 13 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90ff1e3..b44a41f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# 更新日志
+## 2026-10-26 → ✨ 侧栏显示构建时间(确认是否最新版)
+
+- ✨ 侧栏底部显示「构建 10-26 18:01」,等于服务端当前版本时间;页面不是最新版时一眼可辨
+- ✅ 复查:「概览」为菜单首项且是默认打开页;标题、激活态一致;首屏 50 张应用卡片 + 优化建议面板
+
## 2026-10-26 → ✨ 服务端更新后页面自动刷新(解决"改了看不到")
- ✨ `/api/host` 返回 `build`(每次进程启动生成),前端发现 build 变化自动 `location.reload()`
diff --git a/public/app.js b/public/app.js
index 5d13b13..2e7f8a2 100644
--- a/public/app.js
+++ b/public/app.js
@@ -121,6 +121,12 @@ async function refreshHost() {
serverBuild = h.build;
}
const navCl = $('#navContainersLabel'); if (navCl && navCl.textContent !== '运行的容器') navCl.textContent = '运行的容器';
+ const stamp = $('#buildStamp');
+ if (stamp && h.build) {
+ const d = new Date(Number(h.build));
+ const txt = `构建 ${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')} ${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`;
+ if (stamp.textContent !== txt) stamp.textContent = txt;
+ }
$('#hostMini').innerHTML = `${esc(h.hostname)}
${h.cpus} 核 · 内存 ${fmtBytes(h.memTotal)}
运行 ${h.running} / 共 ${h.containers} 容器`;
$('#navRunning').textContent = h.running;
$('#navStopped').textContent = (h.stopped || 0) + (h.pending || 0);
diff --git a/public/index.html b/public/index.html
index 61d41bc..d00af6f 100644
--- a/public/index.html
+++ b/public/index.html
@@ -26,6 +26,7 @@