-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1b5984
commit 0d2de9e
Showing
10 changed files
with
139 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
<template>logout</template> | ||
<template> | ||
<div class="d-flex align-items-center justify-content-center h-100"> | ||
<b-spinner v-if="isLoading" variant="light" small /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
import { mapStores } from 'pinia'; | ||
import { useAuthStore } from '@thxnetwork/studio/stores'; | ||
import { toast } from '@thxnetwork/studio/utils/toast'; | ||
export default defineComponent({ | ||
name: 'Logout', | ||
data() { | ||
return { | ||
isLoading: false, | ||
}; | ||
}, | ||
computed: { | ||
...mapStores(useAuthStore), | ||
}, | ||
async mounted() { | ||
await this.authStore.logout(); | ||
try { | ||
await this.authStore.logout(); | ||
this.isLoading = false; | ||
} catch (error: any) { | ||
toast(error.message, 'light', 3000, () => { | ||
return; | ||
}); | ||
} finally { | ||
this.isLoading = true; | ||
} | ||
}, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<template> | ||
<template v-if="accountStore.account"> | ||
<b-container class="py-5 text-white"> | ||
<h1>{{ accountStore.account.username }}</h1> | ||
<p class="lead">{{ accountStore.account.email }}</p> | ||
</b-container> | ||
<div class="bg-dark py-5 flex-grow-1"> | ||
<b-container> | ||
<b-card variant="darker"> | ||
<BaseFormGroup label="Account ID"> | ||
{{ accountStore.account.sub }} | ||
</BaseFormGroup> | ||
<BaseFormGroup label="Created"> | ||
{{ accountStore.account.createdAt }} | ||
</BaseFormGroup> | ||
</b-card> | ||
</b-container> | ||
</div> | ||
</template> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { mapStores } from 'pinia'; | ||
import { defineComponent } from 'vue'; | ||
import { useAccountStore } from '@thxnetwork/studio/stores'; | ||
export default defineComponent({ | ||
name: 'Account', | ||
computed: { | ||
...mapStores(useAccountStore), | ||
}, | ||
async mounted() { | ||
await this.accountStore.get(); | ||
}, | ||
}); | ||
</script> |
Oops, something went wrong.