tornado-initiation-ui/components/Step.vue
Roman Storm a0eeb14425
wip
2020-10-30 01:01:41 -07:00

52 lines
1.1 KiB
Vue

<template>
<div class="step">
<diamond :active="!!data.deployerAddress" />
<div class="step-body">
<h4>{{ data.title }}</h4>
<div v-if="data.deployerAddress" class="deployed">
Deployed by: <a href="#">{{ data.deployerAddress }}</a>
</div>
</div>
<div class="step-tail">
<div v-if="data.deployerAddress" class="completed">
<b-icon icon="check" />
<span>Completed</span>
</div>
<b-button
v-else
type="is-primary"
outlined
icon-left="tool"
@click="onDeploy"
>
Deploy
</b-button>
</div>
</div>
</template>
<script>
import { mapActions } from 'vuex'
import Diamond from '@/components/Diamond'
export default {
components: {
Diamond,
},
props: {
data: {
type: Object,
required: true,
},
},
methods: {
...mapActions('deploy', ['deployContract']),
// todo pass ens domain here
onDeploy(/* domain */) {
// console.log('this.props', this.data)
this.deployContract({ domain: this.data.domain })
},
},
}
</script>