feat: unify login UI and improve kdocs defaults

This commit is contained in:
2026-02-07 01:27:00 +08:00
parent bf29ac1924
commit 9991834ccd
22 changed files with 358 additions and 114 deletions

View File

@@ -59,7 +59,10 @@ def get_kdocs_status_api():
uploader = get_kdocs_uploader()
status = uploader.get_status()
live = str(request.args.get("live", "")).lower() in ("1", "true", "yes")
if live:
# 重启后首次查询时last_login_ok is None自动做一次实时状态校验
should_live_check = live or status.get("last_login_ok") is None
if should_live_check:
live_status = uploader.refresh_login_status()
if live_status.get("success"):
logged_in = bool(live_status.get("logged_in"))