Home now shows something meaningful
This commit is contained in:
parent
cc2da96829
commit
5f80cef54f
1 changed files with 7 additions and 9 deletions
|
@ -1,9 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="content has-text-centered">
|
||||||
<h3>Hiiiii</h3>
|
<h2>Hi {{user.infos.username}}!</h2>
|
||||||
<span v-if="authenticated">Logged in
|
<p>Click on a list or namespace on the left to get started.</p>
|
||||||
<button v-on:click="logout()" class="button">Logout</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -13,11 +11,11 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Home",
|
name: "Home",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
authenticated: auth.user.authenticated
|
user: auth.user
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
// Check if the user is already logged in, if so, redirect him to the homepage
|
// Check if the user is already logged in, if so, redirect him to the homepage
|
||||||
if (!auth.user.authenticated) {
|
if (!auth.user.authenticated) {
|
||||||
|
@ -25,7 +23,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logout () {
|
logout() {
|
||||||
auth.logout()
|
auth.logout()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue