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 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,6 @@ import danceVideoLight from "@/assets/dance-light.mp4";
|
|||||||
import danceVideoDark from "@/assets/dance-dark.mp4";
|
import danceVideoDark from "@/assets/dance-dark.mp4";
|
||||||
|
|
||||||
import { useTheme } from "@/composables/useTheme";
|
import { useTheme } from "@/composables/useTheme";
|
||||||
import { clearApiKey } from "@/api/client";
|
|
||||||
import { changelog } from "@/data/changelog";
|
import { changelog } from "@/data/changelog";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -50,7 +49,7 @@ async function handleUpdate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleLogout() {
|
function handleLogout() {
|
||||||
clearApiKey();
|
localStorage.clear();
|
||||||
router.replace({ name: 'login' });
|
router.replace({ name: 'login' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user