diff options
Diffstat (limited to 'src')
4 files changed, 16 insertions, 4 deletions
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index 6f6d04a7..d256fc5d 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -79,6 +79,12 @@ export default { set (color) { this.$store.dispatch('setHighlight', { user: this.user.screen_name, color }) } + }, + followeesCountVisible () { + return !this.isOtherUser || !this.user.hide_followings + }, + followersCountVisible () { + return !this.isOtherUser || !this.user.hide_followers } }, components: { diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index e80dc72b..7a087bdf 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -112,11 +112,11 @@ <h5>{{ $t('user_card.statuses') }}</h5> <span>{{user.statuses_count}} <br></span> </div> - <div class="user-count" v-on:click.prevent="setProfileView('friends')" v-if="!user.hide_followings"> + <div class="user-count" v-on:click.prevent="setProfileView('friends')" v-if="followeesCountVisible"> <h5>{{ $t('user_card.followees') }}</h5> <span>{{user.friends_count}}</span> </div> - <div class="user-count" v-on:click.prevent="setProfileView('followers')" v-if="!user.hide_followers"> + <div class="user-count" v-on:click.prevent="setProfileView('followers')" v-if="followersCountVisible"> <h5>{{ $t('user_card.followers') }}</h5> <span>{{user.followers_count}}</span> </div> diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 7b0ab705..4039fd35 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' + }, + followeesTabVisible () { + return this.isUs || !this.user.hide_followings + }, + 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 e981f208..11943660 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')" v-if="!user.hide_followings"> + <div :label="$t('user_card.followees')" v-if="followeesTabVisible"> <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="!user.hide_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> |
