aboutsummaryrefslogtreecommitdiff
path: root/src/components/follow_button
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-04-21 23:27:51 +0300
committerShpuld Shpuldson <shp@cock.li>2020-04-21 23:27:51 +0300
commit6bb75a3a6d8452a3e1b88085fe87cf27386f222c (patch)
tree5142716edc3ad960329d212aba4b5250fbb0c1b9 /src/components/follow_button
parentd5457c323a186ed7890e7ba311c36d189c33d3fa (diff)
make relationships separate from users
Diffstat (limited to 'src/components/follow_button')
-rw-r--r--src/components/follow_button/follow_button.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js
index 12da2645..af7b1fef 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,7 +33,7 @@ export default {
},
methods: {
onClick () {
- this.user.following ? this.unfollow() : this.follow()
+ this.relationship.following ? this.unfollow() : this.follow()
},
follow () {
this.inProgress = true