yandere_fe/src/components/domain_mute_card/domain_mute_card.js

27 lines
551 B
JavaScript
Raw Normal View History

2020-01-15 12:22:54 -08:00
import ProgressButton from '../progress_button/progress_button.vue'
const DomainMuteCard = {
props: ['domain'],
components: {
ProgressButton
},
computed: {
user () {
return this.$store.state.users.currentUser
},
muted () {
return this.user.domainMutes.includes(this.domain)
}
},
2020-01-15 12:22:54 -08:00
methods: {
unmuteDomain () {
return this.$store.dispatch('unmuteDomain', this.domain)
},
muteDomain () {
return this.$store.dispatch('muteDomain', this.domain)
2020-01-15 12:22:54 -08:00
}
}
}
export default DomainMuteCard