hide subscribe button unless following

This commit is contained in:
taehoon 2019-05-20 11:36:44 -04:00
parent 81d1d30586
commit 9712e324e5

View file

@ -46,16 +46,8 @@
</div> </div>
</div> </div>
<div v-if="loggedIn && isOtherUser" class="user-interactions"> <div v-if="loggedIn && isOtherUser" class="user-interactions">
<div class="btn-group"> <div v-if="!user.following">
<button @click="unfollowUser" class="btn btn-default pressed" :disabled="followRequestInProgress" :title="$t('user_card.follow_unfollow')" v-if="user.following"> <button @click="followUser" class="btn btn-default btn-block" :disabled="followRequestInProgress" :title="followRequestSent ? $t('user_card.follow_again') : ''">
<template v-if="followRequestInProgress">
{{ $t('user_card.follow_progress') }}
</template>
<template v-else>
{{ $t('user_card.following') }}
</template>
</button>
<button @click="followUser" class="btn btn-default" :disabled="followRequestInProgress" :title="followRequestSent ? $t('user_card.follow_again') : ''" v-else>
<template v-if="followRequestInProgress"> <template v-if="followRequestInProgress">
{{ $t('user_card.follow_progress') }} {{ $t('user_card.follow_progress') }}
</template> </template>
@ -66,6 +58,16 @@
{{ $t('user_card.follow') }} {{ $t('user_card.follow') }}
</template> </template>
</button> </button>
</div>
<div v-else-if="followRequestInProgress">
<button @click="unfollowUser" class="btn btn-default btn-block pressed" disabled :title="$t('user_card.follow_unfollow')">
{{ $t('user_card.follow_progress') }}
</button>
</div>
<div class="btn-group" v-else>
<button @click="unfollowUser" class="btn btn-default pressed" :title="$t('user_card.follow_unfollow')">
{{ $t('user_card.following') }}
</button>
<ProgressButton class="btn btn-default" :click="subscribeUser" :title="$t('user_card.subscribe')" v-if="!user.subscribed"> <ProgressButton class="btn btn-default" :click="subscribeUser" :title="$t('user_card.subscribe')" v-if="!user.subscribed">
<i class="icon-bell-alt" /> <i class="icon-bell-alt" />
</ProgressButton> </ProgressButton>