aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2019-02-07 15:59:37 +0000
committerShpuld Shpludson <shp@cock.li>2019-02-07 15:59:37 +0000
commit9b49fa3c0c103ff7c62b5792e3b1f5c21d1f40e1 (patch)
treebcea714b42bc2e24b7a5b6a1d5b1648d6800c092
parent85e281d406d61282c01cb0471f7540211114f413 (diff)
parent55da7dbfde84aa78ab54efe51b41d9f09646ed03 (diff)
Merge branch '287-following-followers-tabs' into 'develop'
Hide Following/Followers tabs if user has them disabled Closes #287 See merge request pleroma/pleroma-fe!515
-rw-r--r--src/components/user_profile/user_profile.js6
-rw-r--r--src/components/user_profile/user_profile.vue4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 7b0ab705..e50048fa 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -58,6 +58,12 @@ const UserProfile = {
},
isExternal () {
return this.$route.name === 'external-user-profile'
+ },
+ followsTabVisible () {
+ return this.isUs || !this.user.hide_follows
+ },
+ followersTabVisible () {
+ return this.isUs || !this.user.hide_followers
}
},
methods: {
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 6d5b00d1..9001ed00 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -15,13 +15,13 @@
:timeline-name="'user'"
:user-id="fetchBy"
/>
- <div :label="$t('user_card.followees')">
+ <div :label="$t('user_card.followees')" v-if="followsTabVisible">
<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')">
+ <div :label="$t('user_card.followers')" v-if="followersTabVisible">
<FollowList v-if="user.followers_count > 0" :userId="userId" :showFollowers="true" />
<div class="userlist-placeholder" v-else>
<i class="icon-spin3 animate-spin"></i>