From 944d20dcc71cc7a4df9c5d4c7f2b97a36b0598d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=80=E6=A2=A6?= <3501646051@qq.com> Date: Sun, 17 May 2026 19:51:57 +0800 Subject: [PATCH] fix: 5 auth flow bugs in setup/login routing 1. App.vue: exclude setup page from main layout (header/FAB) 2. request.ts: exempt /auth/setup from 401 hard redirect to /login 3. LoginView: redirect to /setup when backend says password not set 4. SetupView: add missing router.replace after successful setup 5. router guard: only call checkSetup after checkAuth fails, not on every navigation --- WebUI/src/App.vue | 2 +- WebUI/src/api/request.ts | 2 +- WebUI/src/router/index.ts | 26 ++++++++++++++------------ WebUI/src/views/LoginView.vue | 6 +++++- WebUI/src/views/SetupView.vue | 1 + 5 files changed, 22 insertions(+), 15 deletions(-) diff --git a/WebUI/src/App.vue b/WebUI/src/App.vue index 4a430e1..b22ad81 100644 --- a/WebUI/src/App.vue +++ b/WebUI/src/App.vue @@ -67,7 +67,7 @@ onMounted(async () => {