Last change
on this file since 2a2614e was 2a2614e, checked in by Ljubomir Ilievski <ilievski.ljubomir@…>, 3 months ago |
Celosno funkcionalna logika na login/register/logout
|
-
Property mode
set to
100644
|
File size:
437 bytes
|
Line | |
---|
1 | <script>
|
---|
2 |
|
---|
3 | import { userStore } from '@/PiniaStores/UserStore.js'
|
---|
4 | import {useRouter} from 'vue-router'
|
---|
5 |
|
---|
6 | export default {
|
---|
7 | data(){
|
---|
8 | return {
|
---|
9 | userStore_: userStore(),
|
---|
10 | router: useRouter()
|
---|
11 | }
|
---|
12 | },
|
---|
13 | }
|
---|
14 |
|
---|
15 | </script>
|
---|
16 |
|
---|
17 | <template>
|
---|
18 |
|
---|
19 | <a v-on:click="userStore_.clearLocalStorage()" @click="router.push('/login')" v-if="userStore_.data.role!=='UN_AUTHENTICATED'" class="btn btn-dark">Logout</a>
|
---|
20 |
|
---|
21 | </template>
|
---|
22 |
|
---|
23 | <style scoped>
|
---|
24 |
|
---|
25 | </style>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.