diff --git a/resources/js/components/pages/Settings.vue b/resources/js/components/pages/Settings.vue index 6836632..ff38913 100644 --- a/resources/js/components/pages/Settings.vue +++ b/resources/js/components/pages/Settings.vue @@ -1,105 +1,111 @@ @@ -118,6 +124,7 @@ import CopyTextIcon from '../CopyTextIcon.vue'; import { PencilIcon } from '@heroicons/vue/20/solid'; import { AuthApi } from '~/api/auth'; import { addressToPublicKey, isValidAddress, publicKeyToAddress } from '~/util/address'; +import LoadingCircle from '../LoadingCircle.vue'; const router = useRouter(); const appStore = useAppStore(); @@ -127,6 +134,7 @@ const tokenName = ref(); const walletAccount = ref(publicKeyToAddress(appStore.user?.account)); const enableTokenCreate = ref(false); const enableAccountModify = ref(false); +const loading = ref(true); const tokens = computed(() => appStore.user?.apiTokens); @@ -226,4 +234,13 @@ watch( } } ); + +watch( + () => appStore.user, + (userVal) => { + if (userVal) { + loading.value = false; + } + } +); diff --git a/resources/js/store/index.ts b/resources/js/store/index.ts index 38ffe3d..501f93e 100644 --- a/resources/js/store/index.ts +++ b/resources/js/store/index.ts @@ -177,6 +177,7 @@ export const useAppStore = defineStore('app', { return res.data.Login; }, async logout() { + this.loggedIn = false; await AuthApi.logout(); this.clearLogin(); },