From b57b4c6e45ca612a890e594942e86faab5a946e0 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Fri, 8 Feb 2019 05:31:06 -0500
Subject: #291 - disable empty tabs in user profile panel

---
 src/components/user_profile/user_profile.vue | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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

diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 9001ed00..7a1e6a18 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -9,19 +9,20 @@
     <tab-switcher :renderOnlyFocused="true">
       <Timeline
         :label="$t('user_card.statuses')"
+        :diabled="!user.statuses_count"
         :embedded="true"
         :title="$t('user_profile.timeline_title')"
         :timeline="timeline"
         :timeline-name="'user'"
         :user-id="fetchBy"
       />
-      <div :label="$t('user_card.followees')" v-if="followsTabVisible">
+      <div :label="$t('user_card.followees')" v-if="followsTabVisible" :disabled="!user.friends_count">
         <FollowList v-if="user.friends_count > 0" :userId="userId" :showFollowers="false" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
         </div>
       </div>
-      <div :label="$t('user_card.followers')" v-if="followersTabVisible">
+      <div :label="$t('user_card.followers')" v-if="followersTabVisible" :disabled="!user.followers_count">
         <FollowList v-if="user.followers_count > 0" :userId="userId" :showFollowers="true" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
@@ -29,6 +30,7 @@
       </div>
       <Timeline
         :label="$t('user_card.media')"
+        :disabled="!user.media_count"
         :embedded="true" :title="$t('user_card.media')"
         timeline-name="media"
         :timeline="media"
@@ -37,6 +39,7 @@
       <Timeline
         v-if="isUs"
         :label="$t('user_card.favorites')"
+        :disabled="!user.favourites_count"
         :embedded="true"
         :title="$t('user_card.favorites')"
         timeline-name="favorites"
-- 
cgit v1.2.3-70-g09d2

