fix: 全站 bug 审查修复 (前端9项 + 后端5项)
Nexus CI/CD / test (push) Waiting to run
Nexus CI/CD / deploy (push) Blocked by required conditions
Nexus Pre-commit Checks / quick-check (push) Waiting to run

前端修复:
- P0: App.vue http 未导入导致全局搜索崩溃
- P1: TOTP 登录流程断裂 (TotpRequiredError 非 ApiError 子类)
- P1: ServersPage 编辑服务器 domain 被端口字符串污染
- P1: PushPage Set[0] 无效 → values().next().value
- P1: SettingsPage API 返回字符串未转数字
- P2: api/index.ts getList 重复定义移除
- P2: LoginPage 锁定倒计时 now ref + watch 更新
- P2: TerminalPage 路径验证正则放松 (允许空格/中文)
- P2: useWebSocket CONNECTING/CLOSING 状态关闭旧连接

后端修复:
- P1: websocket.py redis.keys() → scan_iter() 避免阻塞
- P1: auth_service.py TTL 仅在 key 无 TTL 时设置
- P1: servers.py 批量操作加 asyncio.Lock 避免并发 session commit
- P2: settings.py asyncio.get_event_loop() → get_running_loop()
- P2: settings.py datetime.utcfromtimestamp() → datetime.fromtimestamp(tz=utc)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-06-01 11:24:55 +08:00
parent df2c188f5d
commit 6183047fd6
16 changed files with 60 additions and 38 deletions
+6 -1
View File
@@ -252,7 +252,12 @@ async function loadSettings() {
const key = item.key
if (key && knownKeys.includes(key)) {
const val = item.value
;(settings.value as Record<string, unknown>)[key] = val
// Type-cast numeric strings back to numbers for number inputs
if (typeof val === 'string' && /^\d+(\.\d+)?$/.test(val)) {
(settings.value as Record<string, unknown>)[key] = Number(val)
} else {
(settings.value as Record<string, unknown>)[key] = val
}
}
}
} catch {