This commit is contained in:
toom1996
2026-09-14 00:42:45 +08:00
parent d6cb616337
commit 548155625d
22 changed files with 707 additions and 454 deletions

View File

@ -179,7 +179,11 @@ const headers = {
<footer class="relative z-[1] bg-white mt-20 pt-10 border-t-2 border-black text-black w-full font-sans">
<script>
import { getUser, fetchMe, logout } from "@/lib/auth"
import { getUser } from "@/lib/auth"
import { fetchMe, logout, enforceIdleLogout } from "@/lib/api"
// 空闲登出:超过 config.idleLogoutDays 天没访问则登出(在 Alpine 初始化前先跑,避免登录态闪烁)
enforceIdleLogout()
document.addEventListener("alpine:init", () => {
Alpine.data("authMenu", () => ({