diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-12-21 17:33:29 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-01-03 10:01:03 +0100 |
commit | 6afde1293259041d1504ce0cc8e997c03ccd04ae (patch) | |
tree | 8cf2835d858e4e3fe8cdc6f16383ae48d68e700e /src/mixins | |
parent | fb3e156846b09360b43e30c032acb47a8401265d (diff) |
Move follow/unfollow to store and rework account store handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/mixins')
-rw-r--r-- | src/mixins/currentUserMixin.js | 4 | ||||
-rw-r--r-- | src/mixins/serverData.js | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mixins/currentUserMixin.js b/src/mixins/currentUserMixin.js index 1678b3f3..d961ab80 100644 --- a/src/mixins/currentUserMixin.js +++ b/src/mixins/currentUserMixin.js @@ -33,9 +33,7 @@ export default { return '@' + this.cloudId }, cloudId() { - const url = document.createElement('a') - url.setAttribute('href', this.serverData.cloudAddress) - return this.currentUser.uid + '@' + url.hostname + return this.currentUser.uid + '@' + this.hostname } } } diff --git a/src/mixins/serverData.js b/src/mixins/serverData.js index 24783e3c..1fdcbfd1 100644 --- a/src/mixins/serverData.js +++ b/src/mixins/serverData.js @@ -24,6 +24,11 @@ export default { computed: { serverData: function() { return this.$store.getters.getServerData + }, + hostname() { + const url = document.createElement('a') + url.setAttribute('href', this.serverData.cloudAddress) + return url.hostname } } } |