fix(update): 取消 WebUI 与核心版本对比,消除“webui有新版本!”的误报 (#3106)

* fix(update): 取消 WebUI 与核心版本对比,消除“webui有新版本!”的误报

不再比较 dv 与核心版本

* fix(update): 保留dv逻辑,新增installed标识以避免误报

新增安装状态布尔值,保留“dv 是否存在”的信息

* Fix dashboard version update check logic

---------

Co-authored-by: LIghtJUNction <lightjunction.me@gmail.com>
This commit is contained in:
exynos
2025-10-20 16:15:42 +08:00
committed by GitHub
parent 2c5f68e696
commit f122b17097
+8 -2
View File
@@ -52,10 +52,15 @@ class UpdateRoute(Route):
try:
dv = await get_dashboard_version()
# WebUI 版本独立于核心版本:不再用 dv 与 v{VERSION} 比较,避免误报
if type_ == "dashboard":
return (
Response()
.ok({"has_new_version": dv != f"v{VERSION}", "current_version": dv})
.ok({
"has_new_version": False,
"current_version": dv,
"installed": bool(dv),
})
.__dict__
)
else:
@@ -67,7 +72,8 @@ class UpdateRoute(Route):
"version": f"v{VERSION}",
"has_new_version": ret is not None,
"dashboard_version": dv,
"dashboard_has_new_version": dv and dv != f"v{VERSION}",
# dv正常获取则不会提示需要更新
"dashboard_has_new_version": not bool(dv),
},
).__dict__
except Exception as e: