feat: 门禁增强 — 输错5次锁定1h + 退出登录

This commit is contained in:
ice-a
2026-10-16 19:15:15 +08:00
parent 9b3113bc33
commit 2c781164f0
10 changed files with 137 additions and 13 deletions
+3 -2
View File
@@ -3,7 +3,7 @@ import { listProviders } from '../utils/search'
import { checkWebTorrent } from '../utils/torrent'
import { loadSettings } from '../utils/appconfig'
export default defineEventHandler(async () => {
export default defineEventHandler(async (event) => {
const [mongo, webTorrent, settings] = await Promise.all([mongoStatus(), checkWebTorrent(), loadSettings()])
return {
ok: true,
@@ -13,6 +13,7 @@ export default defineEventHandler(async () => {
providers: listProviders(),
enabledProviders: settings.enabledProviders,
searchProxy: settings.searchProxy ? '已配置' : '未配置',
clients: settings.btClients.map((c) => ({ id: c.id, type: c.type, name: c.name, endpoint: `${c.host}:${c.port}`, enabled: c.enabled !== false }))
clients: settings.btClients.map((c) => ({ id: c.id, type: c.type, name: c.name, endpoint: `${c.host}:${c.port}`, enabled: c.enabled !== false })),
authed: getCookie(event, 'web_unlock') === '1'
}
})