frontend/src/views/sharing/LinkSharingAuth.vue
konrad a0b9acee41 Add Page Titles Everywhere (#177)
Add page titles everywhere

Add global mixin to set page title

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/frontend#177
2020-07-07 20:07:13 +00:00

42 lines
737 B
Vue

<template>
<div class="message is-centered is-info" v-if="loading">
<div class="message-header">
<p class="has-text-centered">
Authenticating...
</p>
</div>
</div>
</template>
<script>
import router from '../../router'
export default {
name: 'LinkSharingAuth',
data() {
return {
hash: '',
loading: true,
}
},
created() {
this.auth()
},
mounted() {
this.setTitle('Authenticating...')
},
methods: {
auth() {
this.$store.dispatch('auth/linkShareAuth', this.$route.params.share)
.then((r) => {
this.loading = false
router.push({name: 'list.list', params: {listId: r.list_id}})
})
.catch(e => {
this.error(e, this)
})
}
},
}
</script>