aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_settings/user_settings.js
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-02-13 22:04:28 -0500
committertaehoon <th.dev91@gmail.com>2019-02-20 13:30:30 -0500
commite91a94ff9c4b9559f53a4b001f8972ceca843771 (patch)
tree40b879d37bb8ab8c6f12f6ae7c13af06e1e3a140 /src/components/user_settings/user_settings.js
parent09315b27804beadb7590f8e908ae9d0eb1d6a992 (diff)
Add mutes tab
Diffstat (limited to 'src/components/user_settings/user_settings.js')
-rw-r--r--src/components/user_settings/user_settings.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index 8eade382..8114d5e2 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -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 () {