diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-10-04 19:02:04 -0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 19:02:04 -0100 |
commit | 05134a1c38d8c288f5f96304accd5d313a90fd93 (patch) | |
tree | 406bf835e872e4ce7b3dd870b269a1ec4945e2c7 /src | |
parent | d82cb4906b38cc61630f34a3bbfbdd339bc4a55e (diff) | |
parent | c82befe38b92b6f553937bd998df4494a579e4a8 (diff) |
Merge pull request #787 from StCyr/bugfix/776/do-not-show-followbutton
FIX: do not show follow button when viewer is same as viewed
Diffstat (limited to 'src')
-rw-r--r-- | src/components/FollowButton.vue | 3 | ||||
-rw-r--r-- | src/components/ProfileInfo.vue | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/components/FollowButton.vue b/src/components/FollowButton.vue index f23a91cc..d2c76953 100644 --- a/src/components/FollowButton.vue +++ b/src/components/FollowButton.vue @@ -21,7 +21,8 @@ --> <template> - <div v-if="!serverData.public && cloudId !== account && actorInfo"> + <!-- Show button only if user is authenticated and she is not the same as the account viewed --> + <div v-if="!serverData.public && actorInfo && actorInfo.viewerLink!='viewer'"> <button v-if="isCurrentUserFollowing" :class="{'icon-loading-small': followLoading}" @click="unfollow()" @mouseover="followingText=t('social', 'Unfollow')" @mouseleave="followingText=t('social', 'Following')"> diff --git a/src/components/ProfileInfo.vue b/src/components/ProfileInfo.vue index c7451f6b..467f7213 100644 --- a/src/components/ProfileInfo.vue +++ b/src/components/ProfileInfo.vue @@ -150,7 +150,7 @@ export default { }, methods: { followRemote() { - window.open(OC.generateUrl('/apps/social/api/v1/ostatus/followRemote/' + encodeURI(this.uid)), 'followRemote', 'width=433,height=600toolbar=no,menubar=no,scrollbars=yes,resizable=yes') + window.open(OC.generateUrl('/apps/social/api/v1/ostatus/followRemote/' + encodeURI(this.localUid)), 'followRemote', 'width=433,height=600toolbar=no,menubar=no,scrollbars=yes,resizable=yes') } } } |