Merge branch 'develop' into feature/following_reblogs
This commit is contained in:
commit
f6c0e06884
|
@ -9,8 +9,7 @@ const FollowCard = {
|
||||||
],
|
],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
inProgress: false,
|
inProgress: false
|
||||||
requestSent: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
@ -28,9 +27,8 @@ const FollowCard = {
|
||||||
methods: {
|
methods: {
|
||||||
followUser () {
|
followUser () {
|
||||||
this.inProgress = true
|
this.inProgress = true
|
||||||
requestFollow(this.user, this.$store).then(({ sent }) => {
|
requestFollow(this.user, this.$store).then(() => {
|
||||||
this.inProgress = false
|
this.inProgress = false
|
||||||
this.requestSent = sent
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
unfollowUser () {
|
unfollowUser () {
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
v-if="!user.following"
|
v-if="!user.following"
|
||||||
class="btn btn-default follow-card-follow-button"
|
class="btn btn-default follow-card-follow-button"
|
||||||
:disabled="inProgress"
|
:disabled="inProgress"
|
||||||
:title="requestSent ? $t('user_card.follow_again') : ''"
|
:title="user.requested ? $t('user_card.follow_again') : ''"
|
||||||
@click="followUser"
|
@click="followUser"
|
||||||
>
|
>
|
||||||
<template v-if="inProgress">
|
<template v-if="inProgress">
|
||||||
{{ $t('user_card.follow_progress') }}
|
{{ $t('user_card.follow_progress') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="requestSent">
|
<template v-else-if="user.requested">
|
||||||
{{ $t('user_card.follow_sent') }}
|
{{ $t('user_card.follow_sent') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|
Loading…
Reference in New Issue