Files
kabukicho-vscode/demos/vuedemo.vue
T
Victoria Drake de4dcd5d21 Go, roboto! Launch!! 🤖
2020-02-02 11:03:57 -05:00

42 lines
662 B
Vue

<template>
<div>
<button @click="getNewIntent" :class="{ disabled: uiState === 'listening' }"></button>
</div>
</template>
<script>
export default {
props: {
aborted: {
type: Boolean,
default: false,
required: true
}
},
computed: {
uiState() {
return this.$store.state.uiState
}
},
methods: {
getNewIntent() {
this.$store.dispatch('getSpeech')
this.$emit('isaborted', false)
}
}
}
</script>
<style scoped>
button {
border-radius: 1000px;
background: teal;
margin-top: 10px;
transition: 0.3s all ease-out;
}
button.disabled {
background: #ccc;
cursor: none;
}
</style>