feat: 项目自动选中、重命名接口与长配置值展开;页面显示版本号 v1.0.<commit> build <时间>
build-and-deploy / build-and-deploy (push) Successful in 28s

This commit is contained in:
jif2.zhang
2026-09-14 09:47:59 +08:00
parent 1765caba50
commit 37c781e6b9
14 changed files with 383 additions and 66 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* 版本号加载器
* 读取 /api/version 并将版本号填充到页面元素的 #version-text(或 .statusbar-version)
*/
(function () {
function fill(text) {
var el = document.getElementById("version-text");
if (!el) el = document.querySelector(".statusbar-version");
if (!el) return;
el.textContent = text;
}
try {
fetch("/api/version")
.then(function (r) {
if (!r.ok) throw new Error("bad status");
return r.json();
})
.then(function (data) {
if (data && data.success && data.data) {
fill(data.data.version || "");
}
})
.catch(function () {});
} catch (e) {}
})();