From b4359ccddbdc6988c6de31c9f345a81dc1058d6b Mon Sep 17 00:00:00 2001 From: ekko <152005280+EKKOLearnAI@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:52:06 +0800 Subject: [PATCH] fix: clear all localStorage on logout (#161) Previously only cleared the auth token, leaving server URL, active profile, chat caches and other data behind. Co-authored-by: Claude Opus 4.6 --- packages/client/src/components/layout/AppSidebar.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/client/src/components/layout/AppSidebar.vue b/packages/client/src/components/layout/AppSidebar.vue index 3f3bf60..2377340 100644 --- a/packages/client/src/components/layout/AppSidebar.vue +++ b/packages/client/src/components/layout/AppSidebar.vue @@ -13,7 +13,6 @@ import danceVideoLight from "@/assets/dance-light.mp4"; import danceVideoDark from "@/assets/dance-dark.mp4"; import { useTheme } from "@/composables/useTheme"; -import { clearApiKey } from "@/api/client"; import { changelog } from "@/data/changelog"; const { t } = useI18n(); @@ -50,7 +49,7 @@ async function handleUpdate() { } function handleLogout() { - clearApiKey(); + localStorage.clear(); router.replace({ name: 'login' }); }