Add mutes tab
This commit is contained in:
parent
09315b2780
commit
e91a94ff9c
7 changed files with 99 additions and 6 deletions
|
@ -6,7 +6,7 @@ import ImageCropper from '../image_cropper/image_cropper.vue'
|
|||
import StyleSwitcher from '../style_switcher/style_switcher.vue'
|
||||
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
|
||||
import BlockCard from '../block_card/block_card.vue'
|
||||
import withLoadMore from '../../hocs/with_load_more/with_load_more'
|
||||
import MuteCard from '../mute_card/mute_card.vue'
|
||||
import withSubscription from '../../hocs/with_subscription/with_subscription'
|
||||
import withList from '../../hocs/with_list/with_list'
|
||||
|
||||
|
@ -18,6 +18,14 @@ const BlockListWithSubscription = withSubscription(
|
|||
'entries'
|
||||
)
|
||||
|
||||
const MuteList = withList(MuteCard, userId => ({ userId }))
|
||||
const MuteListWithSubscription = withSubscription(
|
||||
MuteList,
|
||||
(props, $store) => $store.dispatch('fetchMutes'),
|
||||
(props, $store) => get($store.state.users.currentUser, 'muteIds', []),
|
||||
'entries'
|
||||
)
|
||||
|
||||
const UserSettings = {
|
||||
data () {
|
||||
return {
|
||||
|
@ -55,7 +63,8 @@ const UserSettings = {
|
|||
StyleSwitcher,
|
||||
TabSwitcher,
|
||||
ImageCropper,
|
||||
'block-list': BlockListWithSubscription
|
||||
'block-list': BlockListWithSubscription,
|
||||
'mute-list': MuteListWithSubscription
|
||||
},
|
||||
computed: {
|
||||
user () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue