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
+6
View File
@@ -19,6 +19,11 @@ const mongoPill = computed(() => {
? { cls: 'on', text: 'MONGO' }
: { cls: 'off', text: 'MONGO 未连接' }
})
async function logout() {
await $fetch('/api/logout', { method: 'POST' }).catch(() => {})
await navigateTo('/gate', { reload: true })
}
</script>
<template>
@@ -49,6 +54,7 @@ const mongoPill = computed(() => {
<i class="dot" />
{{ mongoPill.text }}
</NuxtLink>
<button v-if="health?.authed" class="pill" type="button" @click="logout" title="退出登录">退出</button>
<select class="pill lang-select" v-model="lang" title="Language" aria-label="Language">
<option value="en">EN</option>
<option value="zh">中文</option>