logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 9b49fa3c0c103ff7c62b5792e3b1f5c21d1f40e1
parent: 85e281d406d61282c01cb0471f7540211114f413
Author: Shpuld Shpludson <shp@cock.li>
Date:   Thu,  7 Feb 2019 15:59:37 +0000

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

Diffstat:

Msrc/components/user_profile/user_profile.js6++++++
Msrc/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 @@ -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 @@ -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>