security: 改密即吊销全部旧令牌 + 登录防爆破 + COS 异地备份(环境变量开关) + 启动失败重试按钮

This commit is contained in:
root
2026-10-17 10:59:25 +08:00
parent 56a60d5dc1
commit 08b0317d35
8 changed files with 133 additions and 18 deletions
+6
View File
@@ -15,6 +15,12 @@ export function showFatalError(title: string, detail: string): void {
const box = document.createElement('div')
box.style.cssText = 'border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;'
box.textContent = title + '\n' + detail
// 重试入口:纯在线模式下连不上服务器时(如启动失败),一键重载而不是干等着重启应用
const retry = document.createElement('button')
retry.textContent = '重新加载'
retry.style.cssText = 'margin:-4px 0 12px;padding:6px 16px;border:1px solid #E5484D;border-radius:6px;background:#FFFFFF;color:#E5484D;font-size:13px;cursor:pointer;'
retry.addEventListener('click', () => { try { location.reload() } catch { /* 忽略 */ } })
el.appendChild(box)
el.appendChild(retry)
} catch { /* 浮层失败时保持静默 */ }
}