generated from VLADIMIR/template_frontend
add storage
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<header class="header">
|
||||
<p @click="goToLogout" class="btn-login">
|
||||
Выйти
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p>
|
||||
Доброго времени суток, {{ authStore.username }}.
|
||||
</p>
|
||||
<p>
|
||||
{{ authStore.userRoles }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import router from '@/router';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
|
||||
const goToLogout = () => {
|
||||
authStore.logout()
|
||||
|
||||
router.push('/login')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user