2019-02-25 22:51:04 -05:00
|
|
|
<template>
|
|
|
|
<basic-user-card :user="user">
|
2019-02-27 11:58:29 -05:00
|
|
|
<div class="follow-card-content-container">
|
2019-07-05 10:17:44 +03:00
|
|
|
<span
|
2020-05-14 09:27:58 +02:00
|
|
|
v-if="isMe || (!noFollowsYou && relationship.followed_by)"
|
2019-07-05 10:17:44 +03:00
|
|
|
class="faint"
|
|
|
|
>
|
2019-02-26 11:00:25 -05:00
|
|
|
{{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
|
|
|
|
</span>
|
2019-04-11 16:34:46 -04:00
|
|
|
<template v-if="!loggedIn">
|
2019-07-05 10:17:44 +03:00
|
|
|
<div
|
2020-04-21 23:27:51 +03:00
|
|
|
v-if="!relationship.following"
|
2019-07-05 10:17:44 +03:00
|
|
|
class="follow-card-follow-button"
|
|
|
|
>
|
2019-04-11 16:34:46 -04:00
|
|
|
<RemoteFollow :user="user" />
|
|
|
|
</div>
|
|
|
|
</template>
|
2020-05-13 22:58:08 +02:00
|
|
|
<template v-else-if="!isMe">
|
2019-10-17 16:19:52 +03:00
|
|
|
<FollowButton
|
2020-04-21 23:27:51 +03:00
|
|
|
:relationship="relationship"
|
2019-10-17 16:19:52 +03:00
|
|
|
:label-following="$t('user_card.follow_unfollow')"
|
2020-04-23 14:27:27 +03:00
|
|
|
class="follow-card-follow-button"
|
2019-10-17 16:19:52 +03:00
|
|
|
/>
|
2019-04-11 16:34:46 -04:00
|
|
|
</template>
|
2019-02-27 11:58:29 -05:00
|
|
|
</div>
|
2019-02-25 22:51:04 -05:00
|
|
|
</basic-user-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./follow_card.js"></script>
|
2019-02-27 11:58:29 -05:00
|
|
|
|
|
|
|
<style lang="scss">
|
2019-03-21 15:03:54 -04: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-02-27 11:58:29 -05:00
|
|
|
|
2019-03-21 15:03:54 -04:00
|
|
|
&-follow-button {
|
2019-02-27 11:58:29 -05:00
|
|
|
margin-top: 0.5em;
|
|
|
|
margin-left: auto;
|
|
|
|
width: 10em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|