clean up UserCard template

This commit is contained in:
taehoon 2019-04-25 23:32:56 -04:00
parent 3b9ab0e343
commit dbe2decc59

View file

@ -45,11 +45,9 @@
</label>
</div>
</div>
<div v-if="isOtherUser" class="user-interactions">
<div class="follow" v-if="loggedIn">
<span v-if="user.following">
<!--Following them!-->
<button @click="unfollowUser" class="pressed" :disabled="followRequestInProgress" :title="$t('user_card.follow_unfollow')">
<div v-if="loggedIn && isOtherUser" class="user-interactions">
<div class="follow">
<button @click="unfollowUser" class="pressed" :disabled="followRequestInProgress" :title="$t('user_card.follow_unfollow')" v-if="user.following">
<template v-if="followRequestInProgress">
{{ $t('user_card.follow_progress') }}
</template>
@ -57,9 +55,7 @@
{{ $t('user_card.following') }}
</template>
</button>
</span>
<span v-if="!user.following">
<button @click="followUser" :disabled="followRequestInProgress" :title="followRequestSent ? $t('user_card.follow_again') : ''">
<button @click="followUser" :disabled="followRequestInProgress" :title="followRequestSent ? $t('user_card.follow_again') : ''" v-else>
<template v-if="followRequestInProgress">
{{ $t('user_card.follow_progress') }}
</template>
@ -70,9 +66,8 @@
{{ $t('user_card.follow') }}
</template>
</button>
</span>
</div>
<div v-if="loggedIn">
<div>
<ProgressButton :click="subscribeUser" v-if="!user.subscribed">
{{ $t('user_card.subscribe') }}
</ProgressButton>
@ -80,7 +75,7 @@
{{ $t('user_card.subscribed') }}
</ProgressButton>
</div>
<div class='mute' v-if='isOtherUser && loggedIn'>
<div class='mute'>
<span v-if='user.muted'>
<button @click="unmuteUser" class="pressed">
{{ $t('user_card.muted') }}
@ -92,10 +87,7 @@
</button>
</span>
</div>
<div v-if='!loggedIn && user.is_local'>
<RemoteFollow :user="user" />
</div>
<div class='block' v-if='isOtherUser && loggedIn'>
<div class='block'>
<span v-if='user.statusnet_blocking'>
<button @click="unblockUser" class="pressed">
{{ $t('user_card.blocked') }}
@ -107,7 +99,7 @@
</button>
</span>
</div>
<div class='block' v-if='isOtherUser && loggedIn'>
<div class='block'>
<span>
<button @click="reportUser">
{{ $t('user_card.report') }}
@ -116,6 +108,9 @@
</div>
<ModerationTools :user='user' v-if='loggedIn.role === "admin"' />
</div>
<div class="user-interactions" v-if="!loggedIn && user.is_local">
<RemoteFollow :user="user" />
</div>
</div>
</div>
<div class="panel-body" v-if="!hideBio">