pleroma-fe/src/components/follow_card/follow_card.vue

61 lines
1.4 KiB
Vue
Raw Normal View History

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