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/views/sharing/LinkSharingAuth.vue

42 lines
710 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>