Move userProfile link to methods

This commit is contained in:
Maxim Filippov 2018-12-17 02:52:27 +03:00
parent 5f10c5e786
commit ea6977cd4d
4 changed files with 10 additions and 10 deletions

View file

@ -11,9 +11,6 @@ const chatPanel = {
computed: { computed: {
messages () { messages () {
return this.$store.state.chat.messages return this.$store.state.chat.messages
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
} }
}, },
methods: { methods: {
@ -23,6 +20,9 @@ const chatPanel = {
}, },
togglePanel () { togglePanel () {
this.collapsed = !this.collapsed this.collapsed = !this.collapsed
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
} }
} }
} }

View file

@ -21,6 +21,9 @@ const Notification = {
methods: { methods: {
toggleUserExpanded () { toggleUserExpanded () {
this.userExpanded = !this.userExpanded this.userExpanded = !this.userExpanded
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
} }
}, },
computed: { computed: {
@ -31,9 +34,6 @@ const Notification = {
const highlight = this.$store.state.config.highlight const highlight = this.$store.state.config.highlight
const user = this.notification.action.user const user = this.notification.action.user
return highlightStyle(highlight[user.screen_name]) return highlightStyle(highlight[user.screen_name])
},
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name)
} }
} }
} }

View file

@ -29,9 +29,7 @@ const UserCard = {
denyUser () { denyUser () {
this.$store.state.api.backendInteractor.denyUser(this.user.id) this.$store.state.api.backendInteractor.denyUser(this.user.id)
this.$store.dispatch('removeFollowRequest', this.user) this.$store.dispatch('removeFollowRequest', this.user)
} },
},
computed: {
userProfileLink (user) { userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name) return generateProfileLink(user.id, user.screen_name)
} }

View file

@ -92,7 +92,9 @@ const WhoToFollowPanel = {
}, },
suggestionsEnabled () { suggestionsEnabled () {
return this.$store.state.instance.suggestionsEnabled return this.$store.state.instance.suggestionsEnabled
}, }
},
methods: {
userProfileLink (id, name) { userProfileLink (id, name) {
return generateProfileLink(id, name) return generateProfileLink(id, name)
} }