diff options
| author | taehoon <th.dev91@gmail.com> | 2019-02-13 07:15:08 -0500 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-02-20 13:30:30 -0500 |
| commit | a56d2dfeb1c5ddd93c1c23036c0e0f2ca16d273c (patch) | |
| tree | 9e0da202fc70597a524a604398f7ac46bedd078e | |
| parent | 4a737cbe4507e0d0a042871725a310eb4307a766 (diff) | |
Add blocks tab with test data to user settings page
| -rw-r--r-- | src/components/user_settings/user_settings.js | 14 | ||||
| -rw-r--r-- | src/components/user_settings/user_settings.vue | 4 | ||||
| -rw-r--r-- | src/i18n/en.json | 1 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 904060b2..34ab99c7 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -1,9 +1,18 @@ -import { unescape } from 'lodash' +import unescape from 'lodash/unescape' +import get from 'lodash/get' import TabSwitcher from '../tab_switcher/tab_switcher.js' 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 UserList from '../user_list/user_list.vue' +import withLoadMore from '../../hocs/with_load_more/with_load_more' + +const BlockListWithLoadMore = withLoadMore( + UserList, + (props, $store) => $store.dispatch('addFriends', $store.state.users.currentUser.id), + (props, $store) => get($store.getters.userById($store.state.users.currentUser.id), 'friends', []) +) const UserSettings = { data () { @@ -41,7 +50,8 @@ const UserSettings = { components: { StyleSwitcher, TabSwitcher, - ImageCropper + ImageCropper, + 'block-list': BlockListWithLoadMore }, computed: { user () { diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 948b5c25..be9f27e7 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -162,6 +162,10 @@ <h2>{{$t('settings.follow_export_processing')}}</h2> </div> </div> + + <div :label="$t('settings.blocks_tab')"> + <block-list /> + </div> </tab-switcher> </div> </div> diff --git a/src/i18n/en.json b/src/i18n/en.json index 78e8fced..ddde1de2 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -110,6 +110,7 @@ "avatarRadius": "Avatars", "background": "Background", "bio": "Bio", + "blocks_tab": "Blocks", "btnRadius": "Buttons", "cBlue": "Blue (Reply, follow)", "cGreen": "Green (Retweet)", |
