- Added login check for navbar actions

This commit is contained in:
Alexis
2020-07-06 18:24:54 +02:00
parent 78587f8544
commit 27ab62e36f
6 changed files with 19 additions and 11 deletions

View File

@@ -52,8 +52,7 @@ export default {
"password": this.password
})
.then(v => {
let user = v.data
this.$cookies.set("loggedUser", user, 60 * 60 * 24 * 30)
this.$cookies.set("U_", v.data.user, 60 * 60 * 24 * 30)
})
.catch(err => {
console.log(err)

View File

@@ -1,14 +1,17 @@
<template>
<div class="container-fluid">
<section class="fullpage">
<div class="title font-display mb-3">Profil</div>
</section>
<div class="container-fluid p-4" id="spell-container">
<h1 class="display-3 font-display mb-3">{{ user.name }}</h1>
</div>
</template>
<script>
export default {
name: 'profile-page',
data() {
return {
user: this.$cookies.get("U_"),
}
}
}
</script>