4f3a220487
just fetching it over QvitterAPI real quick :DDDDDDDDD
37 lines
711 B
JavaScript
37 lines
711 B
JavaScript
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
|
|
|
const MuteCard = {
|
|
props: ['userId'],
|
|
data () {
|
|
return {
|
|
progress: false
|
|
}
|
|
},
|
|
computed: {
|
|
user () {
|
|
return this.$store.getters.findUser(this.userId)
|
|
},
|
|
muted () {
|
|
return this.user.muted
|
|
}
|
|
},
|
|
components: {
|
|
BasicUserCard
|
|
},
|
|
methods: {
|
|
unmuteUser () {
|
|
this.progress = true
|
|
this.$store.dispatch('unmuteUser', this.user.id).then(() => {
|
|
this.progress = false
|
|
})
|
|
},
|
|
muteUser () {
|
|
this.progress = true
|
|
this.$store.dispatch('muteUser', this.user.id).then(() => {
|
|
this.progress = false
|
|
})
|
|
}
|
|
}
|
|
}
|
|
|
|
export default MuteCard
|