From e9730f24a0f7dd21067fea635834b6c813a6958b Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Tue, 3 Jun 2025 17:18:18 +0800 Subject: [PATCH] Finished Index --- src/client.py | 7 +++ src/static/client/src/App.vue | 5 +- src/static/client/src/assets/main.css | 8 ++++ .../src/components/SignIn/signInForm.vue | 15 +++--- .../client/src/components/SignIn/totpForm.vue | 46 ++++++++++--------- src/static/client/src/router/router.js | 34 ++++++++++---- src/static/client/src/views/index.vue | 40 ++++++++++++++-- src/static/client/src/views/signin.vue | 2 +- src/static/client/src/views/signup.vue | 8 ++-- 9 files changed, 114 insertions(+), 51 deletions(-) diff --git a/src/client.py b/src/client.py index 5f1fc66..7c6794c 100644 --- a/src/client.py +++ b/src/client.py @@ -52,6 +52,13 @@ def createClientBlueprint(wireguardConfigurations: dict[WireguardConfiguration], session['role'] = 'client' session['totpVerified'] = False return ResponseObject(status, msg) + + @client.get(f'{prefix}/api/signout') + def ClientAPI_SignOut(): + session.pop('username') + session.pop('role') + session.pop('totpVerified') + return ResponseObject(True) @client.get(f'{prefix}/api/signin/totp') def ClientAPI_SignIn_TOTP(): diff --git a/src/static/client/src/App.vue b/src/static/client/src/App.vue index 9f6ae7f..ecea778 100644 --- a/src/static/client/src/App.vue +++ b/src/static/client/src/App.vue @@ -6,10 +6,11 @@ import NotificationList from "@/components/notification/notificationList.vue";