This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/components/Home.vue
konrad c0d5f6e99a
All checks were successful
the build was successful
Add password reset (#1)
2018-11-01 21:34:29 +00:00

35 lines
750 B
Vue

<template>
<div class="content has-text-centered">
<h2>Hi {{user.infos.username}}!</h2>
<p>Click on a list or namespace on the left to get started.</p>
</div>
</template>
<script>
import auth from '../auth'
import router from '../router'
export default {
name: "Home",
data() {
return {
user: auth.user
}
},
beforeMount() {
// Check if the user is already logged in, if so, redirect him to the homepage
if (!auth.user.authenticated) {
router.push({name: 'login'})
}
},
methods: {
logout() {
auth.logout()
}
},
}
</script>
<style scoped>
</style>