aboutsummaryrefslogtreecommitdiff
path: root/src/components/follow_button
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-05-12 17:36:05 +0000
committerShpuld Shpludson <shp@cock.li>2020-05-12 17:36:05 +0000
commit5d49edc823ba2ea3e34d4fd6c5efcc84ef9712f7 (patch)
treef4a7a9c10d00083b36fb331c1d9196dc391dcfc7 /src/components/follow_button
parenta0f780c4550b77d4574e0de8932a2dff288784a3 (diff)
parent0bc0a8d5f51f88858a7347b915361c45ff819292 (diff)
Merge branch 'rc/2.0.5' into 'master'
Update MASTER for 2.0.5 patch See merge request pleroma/pleroma-fe!1105
Diffstat (limited to 'src/components/follow_button')
-rw-r--r--src/components/follow_button/follow_button.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js
index 12da2645..95e7cb6b 100644
--- a/src/components/follow_button/follow_button.js
+++ b/src/components/follow_button/follow_button.js
@@ -1,6 +1,6 @@
import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate'
export default {
- props: ['user', 'labelFollowing', 'buttonClass'],
+ props: ['relationship', 'labelFollowing', 'buttonClass'],
data () {
return {
inProgress: false
@@ -8,12 +8,12 @@ export default {
},
computed: {
isPressed () {
- return this.inProgress || this.user.following
+ return this.inProgress || this.relationship.following
},
title () {
- if (this.inProgress || this.user.following) {
+ if (this.inProgress || this.relationship.following) {
return this.$t('user_card.follow_unfollow')
- } else if (this.user.requested) {
+ } else if (this.relationship.requested) {
return this.$t('user_card.follow_again')
} else {
return this.$t('user_card.follow')
@@ -22,9 +22,9 @@ export default {
label () {
if (this.inProgress) {
return this.$t('user_card.follow_progress')
- } else if (this.user.following) {
+ } else if (this.relationship.following) {
return this.labelFollowing || this.$t('user_card.following')
- } else if (this.user.requested) {
+ } else if (this.relationship.requested) {
return this.$t('user_card.follow_sent')
} else {
return this.$t('user_card.follow')
@@ -33,20 +33,20 @@ export default {
},
methods: {
onClick () {
- this.user.following ? this.unfollow() : this.follow()
+ this.relationship.following ? this.unfollow() : this.follow()
},
follow () {
this.inProgress = true
- requestFollow(this.user, this.$store).then(() => {
+ requestFollow(this.relationship.id, this.$store).then(() => {
this.inProgress = false
})
},
unfollow () {
const store = this.$store
this.inProgress = true
- requestUnfollow(this.user, store).then(() => {
+ requestUnfollow(this.relationship.id, store).then(() => {
this.inProgress = false
- store.commit('removeStatus', { timeline: 'friends', userId: this.user.id })
+ store.commit('removeStatus', { timeline: 'friends', userId: this.relationship.id })
})
}
}