feat(ui): logout page

This commit is contained in:
ArneBo 2024-12-30 11:52:48 +01:00 committed by upsiflu
parent 61e03ca9a0
commit 726f73f177
1 changed files with 32 additions and 30 deletions

View File

@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'
import { useStore } from '~/store' import { useStore } from '~/store'
import Button from '~/components/ui/Button.vue' import Button from '~/components/ui/Button.vue'
import Spacer from '~/components/ui/layout/Spacer.vue'
const store = useStore() const store = useStore()
const { t } = useI18n() const { t } = useI18n()
@ -18,7 +19,6 @@ const labels = computed(() => ({
v-title="labels.title" v-title="labels.title"
class="main" class="main"
> >
<section class="ui vertical stripe segment">
<div <div
v-if="store.state.auth.authenticated" v-if="store.state.auth.authenticated"
class="ui small text container" class="ui small text container"
@ -29,7 +29,10 @@ const labels = computed(() => ({
<p> <p>
{{ t('components.auth.Logout.message.loggedIn', { username: store.state.auth.username }) }} {{ t('components.auth.Logout.message.loggedIn', { username: store.state.auth.username }) }}
</p> </p>
<Spacer />
<Button <Button
solid
primary
@click="store.dispatch('auth/logout')" @click="store.dispatch('auth/logout')"
> >
{{ t('components.auth.Logout.button.logout') }} {{ t('components.auth.Logout.button.logout') }}
@ -49,6 +52,5 @@ const labels = computed(() => ({
{{ t('components.auth.Logout.link.login') }} {{ t('components.auth.Logout.link.login') }}
</router-link> </router-link>
</div> </div>
</section>
</main> </main>
</template> </template>