diff options
Diffstat (limited to 'src/components/follow_card')
| -rw-r--r-- | src/components/follow_card/follow_card.js | 2 | ||||
| -rw-r--r-- | src/components/follow_card/follow_card.vue | 19 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/components/follow_card/follow_card.js b/src/components/follow_card/follow_card.js index ac4e265a..7a16f455 100644 --- a/src/components/follow_card/follow_card.js +++ b/src/components/follow_card/follow_card.js @@ -22,7 +22,7 @@ const FollowCard = { isMe () { return this.$store.state.users.currentUser.id === this.user.id }, following () { return this.updated ? this.updated.following : this.user.following }, showFollow () { - return !this.following || this.updated && !this.updated.following + return !this.following || (this.updated && !this.updated.following) }, loggedIn () { return this.$store.state.users.currentUser diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue index 9f314fd3..a808d7ed 100644 --- a/src/components/follow_card/follow_card.vue +++ b/src/components/follow_card/follow_card.vue @@ -1,18 +1,24 @@ <template> <basic-user-card :user="user"> <div class="follow-card-content-container"> - <span class="faint" v-if="!noFollowsYou && user.follows_you"> + <span + v-if="!noFollowsYou && user.follows_you" + class="faint" + > {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }} </span> - <div class="follow-card-follow-button" v-if="showFollow && !loggedIn"> + <div + v-if="showFollow && !loggedIn" + class="follow-card-follow-button" + > <RemoteFollow :user="user" /> </div> <button v-if="showFollow && loggedIn" class="btn btn-default follow-card-follow-button" - @click="followUser" :disabled="inProgress" :title="requestSent ? $t('user_card.follow_again') : ''" + @click="followUser" > <template v-if="inProgress"> {{ $t('user_card.follow_progress') }} @@ -24,7 +30,12 @@ {{ $t('user_card.follow') }} </template> </button> - <button v-if="following" class="btn btn-default follow-card-follow-button pressed" @click="unfollowUser" :disabled="inProgress"> + <button + v-if="following" + class="btn btn-default follow-card-follow-button pressed" + :disabled="inProgress" + @click="unfollowUser" + > <template v-if="inProgress"> {{ $t('user_card.follow_progress') }} </template> |
