From 60828f119c5b8f5de1ba6f6a9d774ef0e813405b Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Thu, 17 Oct 2019 16:19:52 +0300 Subject: [PATCH 1/2] updated FollowCard component --- src/components/follow_button/follow_button.js | 4 +-- .../follow_button/follow_button.vue | 2 +- src/components/follow_card/follow_card.js | 21 +++-------- src/components/follow_card/follow_card.vue | 35 +++---------------- 4 files changed, 12 insertions(+), 50 deletions(-) diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js index 4123c9fd2d..12da264545 100644 --- a/src/components/follow_button/follow_button.js +++ b/src/components/follow_button/follow_button.js @@ -1,6 +1,6 @@ import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate' export default { - props: ['user'], + props: ['user', 'labelFollowing', 'buttonClass'], data () { return { inProgress: false @@ -23,7 +23,7 @@ export default { if (this.inProgress) { return this.$t('user_card.follow_progress') } else if (this.user.following) { - return this.$t('user_card.following') + return this.labelFollowing || this.$t('user_card.following') } else if (this.user.requested) { return this.$t('user_card.follow_sent') } else { diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index f0cbb94b58..66d899b931 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,7 +1,7 @@ From b3f590ceb3e2710b278093a7246a3bf53c9aaafd Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Thu, 17 Oct 2019 20:24:54 +0300 Subject: [PATCH 2/2] clear code --- src/components/follow_button/follow_button.vue | 2 +- src/components/follow_card/follow_card.js | 5 ----- src/components/follow_card/follow_card.vue | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 66d899b931..f0cbb94b58 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,7 +1,7 @@