aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-02-13 14:55:02 -0500
committertaehoon <th.dev91@gmail.com>2019-02-20 13:30:30 -0500
commit0220d3d304cbcb82b8531ff373dce1b35e93fb4f (patch)
tree1b72130932b590727a3e342671bf19cd5f4b6cb0 /src
parent5d6e1864a5602505dedf519ef5f8e64cf19ee158 (diff)
Finally, added BlockCard
Diffstat (limited to 'src')
-rw-r--r--src/components/block_card/block_card.js21
-rw-r--r--src/components/block_card/block_card.vue16
-rw-r--r--src/components/user_settings/user_settings.js6
-rw-r--r--src/i18n/en.json4
4 files changed, 43 insertions, 4 deletions
diff --git a/src/components/block_card/block_card.js b/src/components/block_card/block_card.js
new file mode 100644
index 00000000..8788fb62
--- /dev/null
+++ b/src/components/block_card/block_card.js
@@ -0,0 +1,21 @@
+import BasicUserCard from '../basic_user_card/basic_user_card.vue'
+
+const BlockCard = {
+ props: ['user'],
+ data () {
+ return {
+ progress: false,
+ updated: false
+ }
+ },
+ components: {
+ BasicUserCard
+ },
+ methods: {
+ unblockUser () {
+ this.progress = true
+ }
+ }
+}
+
+export default BlockCard
diff --git a/src/components/block_card/block_card.vue b/src/components/block_card/block_card.vue
new file mode 100644
index 00000000..06fc67fc
--- /dev/null
+++ b/src/components/block_card/block_card.vue
@@ -0,0 +1,16 @@
+<template>
+ <basic-user-card :user="user">
+ <template slot="secondary-area">
+ <button class="btn btn-default" @click="unblockUser" :disabled="progress">
+ <template v-if="progress">
+ {{ $t('user_card.unblock_progress') }}
+ </template>
+ <template v-else>
+ {{ $t('user_card.unblock') }}
+ </template>
+ </button>
+ </template>
+ </basic-user-card>
+</template>
+
+<script src="./block_card.js"></script> \ No newline at end of file
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index a46afda6..3bcecdf4 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -5,13 +5,13 @@ 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 BasicUserCard from '../basic_user_card/basic_user_card.vue'
+import BlockCard from '../block_card/block_card.vue'
import withLoadMore from '../../hocs/with_load_more/with_load_more'
import withList from '../../hocs/with_list/with_list'
-const UserList = withList(BasicUserCard, entry => ({ user: entry }))
+const BlockList = withList(BlockCard, entry => ({ user: entry }))
const BlockListWithLoadMore = withLoadMore(
- UserList,
+ BlockList,
(props, $store) => $store.dispatch('fetchBlocks'),
(props, $store) => get($store.state.users.currentUser, 'blocks', [])
)
diff --git a/src/i18n/en.json b/src/i18n/en.json
index ddde1de2..9027803d 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -366,7 +366,9 @@
"muted": "Muted",
"per_day": "per day",
"remote_follow": "Remote follow",
- "statuses": "Statuses"
+ "statuses": "Statuses",
+ "unblock": "Unblock",
+ "unblock_progress": "Unblocking..."
},
"user_profile": {
"timeline_title": "User Timeline"