forked from AkkomaGang/akkoma-fe
Merge branch 'issue/679' into 'develop'
[#679] fix follow request on search page See merge request pleroma/pleroma-fe!970
This commit is contained in:
commit
7d3330b7b6
2 changed files with 4 additions and 6 deletions
|
@ -9,8 +9,7 @@ const FollowCard = {
|
|||
],
|
||||
data () {
|
||||
return {
|
||||
inProgress: false,
|
||||
requestSent: false
|
||||
inProgress: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -28,9 +27,8 @@ const FollowCard = {
|
|||
methods: {
|
||||
followUser () {
|
||||
this.inProgress = true
|
||||
requestFollow(this.user, this.$store).then(({ sent }) => {
|
||||
requestFollow(this.user, this.$store).then(() => {
|
||||
this.inProgress = false
|
||||
this.requestSent = sent
|
||||
})
|
||||
},
|
||||
unfollowUser () {
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
v-if="!user.following"
|
||||
class="btn btn-default follow-card-follow-button"
|
||||
:disabled="inProgress"
|
||||
:title="requestSent ? $t('user_card.follow_again') : ''"
|
||||
:title="user.requested ? $t('user_card.follow_again') : ''"
|
||||
@click="followUser"
|
||||
>
|
||||
<template v-if="inProgress">
|
||||
{{ $t('user_card.follow_progress') }}
|
||||
</template>
|
||||
<template v-else-if="requestSent">
|
||||
<template v-else-if="user.requested">
|
||||
{{ $t('user_card.follow_sent') }}
|
||||
</template>
|
||||
<template v-else>
|
||||
|
|
Loading…
Reference in a new issue