trusted-setup-server/pages/authorize-contribution.vue

51 lines
1.2 KiB
Vue
Raw Normal View History

2020-02-06 17:16:38 +01:00
<template>
<div class="ceremony">
<h1 class="title is-size-1 is-size-2-mobile is-spaced">
2020-02-06 17:16:38 +01:00
Hello, <span>@{{ userHandle }}</span>
</h1>
<h2 class="subtitle">
2020-02-07 10:21:53 +01:00
Do you want to authorize your contribution #{{ contributionIndex }}? Please sign in.
2020-02-06 17:16:38 +01:00
</h2>
<fieldset class="authorize">
<Form />
</fieldset>
<div class="buttons is-centered">
<b-button v-if="isLoggedIn" :disabled="hasErrorName.invalid" type="is-primary" outlined>
Save information
</b-button>
</div>
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
import Form from '@/components/Form'
export default {
components: {
Form
},
2020-02-07 10:21:53 +01:00
data() {
return {
contributionIndex: 1
}
},
2020-02-06 17:16:38 +01:00
computed: {
...mapGetters('user', ['isLoggedIn', 'hasErrorName']),
userHandle: {
get() {
return this.$store.state.user.handle
}
}
},
async mounted() {
await this.getUserData()
2020-02-07 10:21:53 +01:00
// TODO. parse href to take token (it's supposed to be after #)
// then you need to store it in localstorage OR pass to server (to `/connect`) so after the authorization redirect server can put it in url
2020-02-06 17:16:38 +01:00
},
methods: {
...mapActions('user', ['getUserData'])
}
}
</script>