Library/frontend/src/components/Home.vue

30 lines
474 B
Vue
Raw Normal View History

2017-11-09 11:19:53 +00:00
<template>
<div>
2017-11-22 14:28:55 +00:00
<p v-if="!user.authenticated">
<router-link to="/login" v-lang.login.title></router-link>
</p>
2017-11-09 11:19:53 +00:00
</div>
</template>
<script>
2017-12-05 14:55:56 +00:00
import auth from '../auth'
2017-11-09 11:19:53 +00:00
2017-12-05 14:55:56 +00:00
export default {
name: 'Home',
data () {
return {
user: auth.user
}
},
methods: {
logout () {
auth.logout()
}
},
created () {
// Set the title
document.title = this.translate('nav').home
2017-11-09 13:24:59 +00:00
}
2017-11-09 11:19:53 +00:00
}
</script>