aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card_content/user_card_content.vue
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2018-12-14 17:33:11 +0000
committerShpuld Shpludson <shp@cock.li>2018-12-14 17:33:11 +0000
commit4b30ce64c9f7e90a8d8fb374b91e33916da179f5 (patch)
tree84a838c0deee0997beb4213feeeaba3503277a39 /src/components/user_card_content/user_card_content.vue
parent10a0296aacfd46eee9b400e0964e8aca540b3eae (diff)
parent13fbef4550e0e95024df9f1cc77764b8c734ca3f (diff)
Merge branch 'async_follow' into 'develop'
Better "follow" button behavior Closes #133 See merge request pleroma/pleroma-fe!396
Diffstat (limited to 'src/components/user_card_content/user_card_content.vue')
-rw-r--r--src/components/user_card_content/user_card_content.vue21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 08b25595..a40aff35 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -44,13 +44,26 @@
<div class="follow" v-if="loggedIn">
<span v-if="user.following">
<!--Following them!-->
- <button @click="unfollowUser" class="pressed">
- {{ $t('user_card.following') }}
+ <button @click="unfollowUser" class="pressed" :disabled="followRequestInProgress" :title="$t('user_card.follow_unfollow')">
+ <template v-if="followRequestInProgress">
+ {{ $t('user_card.follow_progress') }}
+ </template>
+ <template v-else>
+ {{ $t('user_card.following') }}
+ </template>
</button>
</span>
<span v-if="!user.following">
- <button @click="followUser">
- {{ $t('user_card.follow') }}
+ <button @click="followUser" :disabled="followRequestInProgress" :title="followRequestSent ? $t('user_card.follow_again') : ''">
+ <template v-if="followRequestInProgress">
+ {{ $t('user_card.follow_progress') }}
+ </template>
+ <template v-else-if="followRequestSent">
+ {{ $t('user_card.follow_sent') }}
+ </template>
+ <template v-else>
+ {{ $t('user_card.follow') }}
+ </template>
</button>
</span>
</div>