diff options
| author | taehoon <th.dev91@gmail.com> | 2019-05-20 11:36:44 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-07-10 21:01:08 -0400 |
| commit | 9712e324e5d6dd4bae5b61a76a28d902545f029f (patch) | |
| tree | 53b09c1b3473087d9d31f5be8b3e2e4c75860d86 /src/components/user_card/user_card.vue | |
| parent | 81d1d30586ba2e528c3ed8a8b59a984bcfb40a64 (diff) | |
hide subscribe button unless following
Diffstat (limited to 'src/components/user_card/user_card.vue')
| -rw-r--r-- | src/components/user_card/user_card.vue | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 9fac0186..70d5a30d 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -46,16 +46,8 @@ </div> </div> <div v-if="loggedIn && isOtherUser" class="user-interactions"> - <div class="btn-group"> - <button @click="unfollowUser" class="btn btn-default pressed" :disabled="followRequestInProgress" :title="$t('user_card.follow_unfollow')" v-if="user.following"> - <template v-if="followRequestInProgress"> - {{ $t('user_card.follow_progress') }} - </template> - <template v-else> - {{ $t('user_card.following') }} - </template> - </button> - <button @click="followUser" class="btn btn-default" :disabled="followRequestInProgress" :title="followRequestSent ? $t('user_card.follow_again') : ''" v-else> + <div v-if="!user.following"> + <button @click="followUser" class="btn btn-default btn-block" :disabled="followRequestInProgress" :title="followRequestSent ? $t('user_card.follow_again') : ''"> <template v-if="followRequestInProgress"> {{ $t('user_card.follow_progress') }} </template> @@ -66,6 +58,16 @@ {{ $t('user_card.follow') }} </template> </button> + </div> + <div v-else-if="followRequestInProgress"> + <button @click="unfollowUser" class="btn btn-default btn-block pressed" disabled :title="$t('user_card.follow_unfollow')"> + {{ $t('user_card.follow_progress') }} + </button> + </div> + <div class="btn-group" v-else> + <button @click="unfollowUser" class="btn btn-default pressed" :title="$t('user_card.follow_unfollow')"> + {{ $t('user_card.following') }} + </button> <ProgressButton class="btn btn-default" :click="subscribeUser" :title="$t('user_card.subscribe')" v-if="!user.subscribed"> <i class="icon-bell-alt" /> </ProgressButton> |
