yandere_fe/src/components/follow_card/follow_card.vue

50 lines
1.1 KiB
Vue
Raw Normal View History

2019-02-25 19:51:04 -08:00
<template>
<basic-user-card :user="user">
<div class="follow-card-content-container">
2019-07-05 00:17:44 -07:00
<span
2020-05-14 00:27:58 -07:00
v-if="isMe || (!noFollowsYou && relationship.followed_by)"
2019-07-05 00:17:44 -07:00
class="faint"
>
2019-02-26 08:00:25 -08:00
{{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
</span>
<template v-if="!loggedIn">
2019-07-05 00:17:44 -07:00
<div
2020-04-21 13:27:51 -07:00
v-if="!relationship.following"
2019-07-05 00:17:44 -07:00
class="follow-card-follow-button"
>
<RemoteFollow :user="user" />
</div>
</template>
<template v-else-if="!isMe">
2019-10-17 06:19:52 -07:00
<FollowButton
2020-04-21 13:27:51 -07:00
:relationship="relationship"
2019-10-17 06:19:52 -07:00
:label-following="$t('user_card.follow_unfollow')"
2020-04-23 04:27:27 -07:00
class="follow-card-follow-button"
:user="user"
2019-10-17 06:19:52 -07:00
/>
</template>
</div>
2019-02-25 19:51:04 -08:00
</basic-user-card>
</template>
<script src="./follow_card.js"></script>
<style lang="scss">
2019-03-21 12:03:54 -07:00
.follow-card {
&-content-container {
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
line-height: 1.5em;
}
2019-03-21 12:03:54 -07:00
&-follow-button {
margin-top: 0.5em;
margin-left: auto;
width: 10em;
}
}
</style>