client: fix follow button getting stuck processing

If a user on a remote instances changes their profile to manually accept
follow requests, this change may not immediately be federated. Because of
this, a user may get stuck seeing "processing".
This commit is contained in:
Johann150 2022-10-30 17:27:05 +01:00
parent 240ad1cca6
commit 47b2f619a6
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -5,26 +5,17 @@
:disabled="wait" :disabled="wait"
@click="onClick" @click="onClick"
> >
<template v-if="!wait"> <template v-if="wait">
<template v-if="hasPendingFollowRequestFromYou && user.isLocked"> <span v-if="full">{{ i18n.ts.processing }}</span><i class="fas fa-spinner fa-pulse fa-fw"></i>
<span v-if="full">{{ i18n.ts.followRequestPending }}</span><i class="fas fa-hourglass-half"></i>
</template> </template>
<template v-else-if="hasPendingFollowRequestFromYou && !user.isLocked"> <template v-else-if="hasPendingFollowRequestFromYou">
<!-- つまりリモートフォローの場合 --> <span v-if="full">{{ i18n.ts.followRequestPending }}</span><i class="fas fa-hourglass-half"></i>
<span v-if="full">{{ i18n.ts.processing }}</span><i class="fas fa-spinner fa-pulse"></i>
</template> </template>
<template v-else-if="isFollowing"> <template v-else-if="isFollowing">
<span v-if="full">{{ i18n.ts.unfollow }}</span><i class="fas fa-minus"></i> <span v-if="full">{{ i18n.ts.unfollow }}</span><i class="fas fa-minus"></i>
</template> </template>
<template v-else-if="!isFollowing && user.isLocked">
<span v-if="full">{{ i18n.ts.followRequest }}</span><i class="fas fa-plus"></i>
</template>
<template v-else-if="!isFollowing && !user.isLocked">
<span v-if="full">{{ i18n.ts.follow }}</span><i class="fas fa-plus"></i>
</template>
</template>
<template v-else> <template v-else>
<span v-if="full">{{ i18n.ts.processing }}</span><i class="fas fa-spinner fa-pulse fa-fw"></i> <span v-if="full">{{ user.isLocked ? i18n.ts.followRequest : i18n.ts.follow }}</span><i class="fas fa-plus"></i>
</template> </template>
</button> </button>
</template> </template>