|
@@ -1,7 +1,7 @@
|
1
|
1
|
<template>
|
2
|
2
|
<!-- eslint-disable max-len -->
|
3
|
3
|
<nav class="navbar navbar-default navbar-trans navbar-expand-lg fixed-top">
|
4
|
|
- <div class="container-fluid">
|
|
4
|
+ <div class="container">
|
5
|
5
|
<button
|
6
|
6
|
class="navbar-toggler collapsed"
|
7
|
7
|
type="button"
|
|
@@ -16,12 +16,6 @@
|
16
|
16
|
<span></span>
|
17
|
17
|
</button>
|
18
|
18
|
<a class="navbar-brand text-brand" @click="routerGoTo('/')">
|
19
|
|
- <img
|
20
|
|
- class="img-fluid"
|
21
|
|
- src="/img/logos/UVProp.png"
|
22
|
|
- alt="Voasa Logo"
|
23
|
|
- style="width:90px;height:45px;"
|
24
|
|
- />
|
25
|
19
|
Uni-Vate
|
26
|
20
|
<span class="color-b">Properties</span>
|
27
|
21
|
</a>
|
|
@@ -220,16 +214,32 @@
|
220
|
214
|
<span class="fa fa-search" aria-hidden="true"></span>
|
221
|
215
|
</button>
|
222
|
216
|
</div>
|
|
217
|
+ <span v-if="showLogout">
|
|
218
|
+ <a @click="logout()">Logout</a>
|
|
219
|
+ </span>
|
|
220
|
+ <span v-else></span>
|
223
|
221
|
</nav>
|
224
|
222
|
</template>
|
|
223
|
+
|
225
|
224
|
<script>
|
226
|
|
-import { mapGetters } from 'vuex';
|
|
225
|
+import { mapGetters, mapActions } from 'vuex';
|
227
|
226
|
|
228
|
227
|
export default {
|
229
|
|
- computed: {},
|
|
228
|
+ data() {
|
|
229
|
+ return {};
|
|
230
|
+ },
|
|
231
|
+ computed: {
|
|
232
|
+ showLogout() {
|
|
233
|
+ return this.$store.state.authentication.status === 'success';
|
|
234
|
+ },
|
|
235
|
+ Logout() {
|
|
236
|
+ return this.$store.state.authentication.methods.logout;
|
|
237
|
+ },
|
|
238
|
+ },
|
230
|
239
|
|
231
|
240
|
methods: {
|
232
|
241
|
...mapGetters('authentication', ['isLoggedIn']),
|
|
242
|
+ ...mapActions('authentication', ['logout']),
|
233
|
243
|
|
234
|
244
|
routerGoTo(goTo) {
|
235
|
245
|
console.log(goTo);
|