2018-03-08 09:41:39 +01:00
|
|
|
<template>
|
|
|
|
<div id="authorize">
|
|
|
|
<el-form ref="form" :model="authorizeForm" label-width="120px" label-position="top">
|
|
|
|
<el-form-item label="Please paste authorization code from your browser:">
|
|
|
|
<el-input v-model="authorizeForm.code"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item class="submit">
|
|
|
|
<el-button type="primary" @click="authorizeSubmit">Submit</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'authorize',
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
authorizeForm: {
|
|
|
|
code: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
authorizeSubmit () {
|
|
|
|
this.$store.dispatch('Authorize/submit', this.authorizeForm.code)
|
2018-03-08 16:24:18 +01:00
|
|
|
.then((id) => {
|
2018-03-09 07:21:25 +01:00
|
|
|
this.$router.push({ path: `/${id}/home` })
|
2018-03-08 16:24:18 +01:00
|
|
|
})
|
2018-03-08 09:41:39 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2018-03-09 08:14:47 +01:00
|
|
|
<style lang="scss">
|
|
|
|
body { font-family: 'Source Sans Pro', sans-serif; }
|
|
|
|
|
2018-03-08 09:41:39 +01:00
|
|
|
#authorize {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
</style>
|