精修 WebUI 第十八轮:后端 /api/version + 预约卡 hover accent
- 后端 gui/web_gui.py 新增 GET /api/version:返回 {name, version, build},前端 footer 自动从 cache-bust fallback 切换为真实版本号
- 预约卡 .reservationItem hover 时左侧浮现 2px primary accent 条;isImminent / isDue 状态下不显示(避免与 warning/danger 边框冲突)
- 高价值直播间共用 reservationItem 视觉,自动获得相同 hover accent
- cache-bust v20 → v21
This commit is contained in:
1 parent
632951d004
commit
f16eadbd75
3 files changed
+35
-2
No files matched your search
@@ -1738,6 +1738,16 @@ class Handler(BaseHTTPRequestHandler):
|
||||
# 提供 CSRF token 给前端
|
||||
if u.path == "/api/csrf-token":
|
||||
return self._send_json({"token": _CSRF_TOKEN})
|
||||
if u.path == "/api/version":
|
||||
try:
|
||||
from version import APP_VERSION, APP_BUILD_DATE, APP_NAME
|
||||
except Exception:
|
||||
APP_VERSION, APP_BUILD_DATE, APP_NAME = "?", "?", "douyin_guaji"
|
||||
return self._send_json({
|
||||
"name": APP_NAME,
|
||||
"version": str(APP_VERSION).lstrip("Vv"),
|
||||
"build": APP_BUILD_DATE,
|
||||
})
|
||||
if u.path == "/api/devices":
|
||||
adb = find_adb_executable()
|
||||
return self._send_json({"adb": adb, "devices": list_adb_devices(adb)})
|
||||
|
||||
Reference in new issue
Block a user