|
@@ -8,6 +8,7 @@
|
|
import { showSettings, activeUserCount, USAGE_POOL, mobile, showSidebar } from '$lib/stores';
|
|
import { showSettings, activeUserCount, USAGE_POOL, mobile, showSidebar } from '$lib/stores';
|
|
import { fade, slide } from 'svelte/transition';
|
|
import { fade, slide } from 'svelte/transition';
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
|
|
+ import { userSignOut } from '$lib/apis/auths';
|
|
|
|
|
|
const i18n = getContext('i18n');
|
|
const i18n = getContext('i18n');
|
|
|
|
|
|
@@ -154,7 +155,8 @@
|
|
|
|
|
|
<button
|
|
<button
|
|
class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
|
|
class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
|
|
- on:click={() => {
|
|
|
|
|
|
+ on:click={async () => {
|
|
|
|
+ await userSignOut();
|
|
localStorage.removeItem('token');
|
|
localStorage.removeItem('token');
|
|
location.href = '/auth';
|
|
location.href = '/auth';
|
|
show = false;
|
|
show = false;
|