From 9712e324e5d6dd4bae5b61a76a28d902545f029f Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Mon, 20 May 2019 11:36:44 -0400
Subject: hide subscribe button unless following

---
 src/components/user_card/user_card.vue | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

(limited to 'src/components/user_card/user_card.vue')

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>
-- 
cgit v1.2.3-70-g09d2

