diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-12-05 09:48:02 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-12-05 09:48:02 +0100 |
commit | 8184dbd70583e79686322f5b551167168e283392 (patch) | |
tree | 82a3e227b8b613f1995432e3462a765e2763ff7e /src/mixins | |
parent | 3232df7a8c0e7e203b9df610412130530a80be79 (diff) |
Hide follow actions for own account
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/mixins')
-rw-r--r-- | src/mixins/currentUserMixin.js | 9 | ||||
-rw-r--r-- | src/mixins/follow.js | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/mixins/currentUserMixin.js b/src/mixins/currentUserMixin.js index 8bc5adfa..1678b3f3 100644 --- a/src/mixins/currentUserMixin.js +++ b/src/mixins/currentUserMixin.js @@ -26,13 +26,16 @@ export default { serverData ], computed: { - currentUser: function() { + currentUser() { return OC.getCurrentUser() }, - socialId: function() { + socialId() { + return '@' + this.cloudId + }, + cloudId() { const url = document.createElement('a') url.setAttribute('href', this.serverData.cloudAddress) - return '@' + OC.getCurrentUser().uid + '@' + url.hostname + return this.currentUser.uid + '@' + url.hostname } } } diff --git a/src/mixins/follow.js b/src/mixins/follow.js index 2a9a3aa9..43e5e541 100644 --- a/src/mixins/follow.js +++ b/src/mixins/follow.js @@ -48,7 +48,7 @@ export default { }).catch((error) => { this.followLoading = false OC.Notification.showTemporary(`Failed to follow user ${this.item.account}`) - console.error(`Failed to follow user ${this.item.account}`, error) + console.error(`Failed to follow user ${this.item.account}`, error.response.data) }) }, @@ -63,7 +63,7 @@ export default { }).catch((error) => { this.followLoading = false OC.Notification.showTemporary(`Failed to unfollow user ${this.item.account}`) - console.error(`Failed to unfollow user ${this.item.account}`, error) + console.error(`Failed to unfollow user ${this.item.account}`, error.response.data) }) } } |