add bulk mute/unmute buttons and wire up to vuex
This commit is contained in:
parent
13c8f10f4b
commit
d3cad54aa3
3 changed files with 59 additions and 23 deletions
|
@ -361,6 +361,12 @@ const UserSettings = {
|
|||
},
|
||||
unblockUsers (ids) {
|
||||
return this.$store.dispatch('unblockUsers', ids)
|
||||
},
|
||||
muteUsers (ids) {
|
||||
return this.$store.dispatch('muteUsers', ids)
|
||||
},
|
||||
unmuteUsers (ids) {
|
||||
return this.$store.dispatch('unmuteUsers', ids)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,6 +231,22 @@
|
|||
</Autosuggest>
|
||||
</div>
|
||||
<MuteList :refresh="true" :getKey="item => item">
|
||||
<template slot="header" slot-scope="p">
|
||||
<div class="bulk-actions-wrapper">
|
||||
<ProgressButton class="btn btn-default" v-if="p.selected.length > 0" :click="() => muteUsers(p.selected)">
|
||||
{{ $t('user_card.mute') }}
|
||||
<template slot="progress">
|
||||
{{ $t('user_card.mute_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
<ProgressButton class="btn btn-default" v-if="p.selected.length > 0" :click="() => unmuteUsers(p.selected)">
|
||||
{{ $t('user_card.unmute') }}
|
||||
<template slot="progress">
|
||||
{{ $t('user_card.unmute_progress') }}
|
||||
</template>
|
||||
</ProgressButton>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="item" slot-scope="p">
|
||||
<MuteCard :userId="p.item" />
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue