logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

follow_card.vue (1414B)


  1. <template>
  2. <basic-user-card :user="user">
  3. <div class="follow-card-content-container">
  4. <span
  5. v-if="isMe || (!noFollowsYou && relationship.followed_by)"
  6. class="faint"
  7. >
  8. {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
  9. </span>
  10. <template v-if="!loggedIn">
  11. <div
  12. v-if="!relationship.following"
  13. class="follow-card-follow-button"
  14. >
  15. <RemoteFollow :user="user" />
  16. </div>
  17. </template>
  18. <template v-else-if="!isMe">
  19. <FollowButton
  20. :relationship="relationship"
  21. :label-following="$t('user_card.follow_unfollow')"
  22. class="follow-card-follow-button"
  23. :user="user"
  24. />
  25. <RemoveFollowerButton
  26. v-if="noFollowsYou && relationship.followed_by"
  27. :user="user"
  28. :relationship="relationship"
  29. class="follow-card-button"
  30. />
  31. </template>
  32. </div>
  33. </basic-user-card>
  34. </template>
  35. <script src="./follow_card.js"></script>
  36. <style lang="scss">
  37. .follow-card {
  38. &-content-container {
  39. flex-shrink: 0;
  40. display: flex;
  41. flex-flow: row wrap;
  42. justify-content: space-between;
  43. line-height: 1.5em;
  44. }
  45. &-button {
  46. margin-top: 0.5em;
  47. padding: 0 1.5em;
  48. margin-left: 1em;
  49. }
  50. &-follow-button {
  51. margin-top: 0.5em;
  52. margin-left: auto;
  53. width: 10em;
  54. }
  55. }
  56. </style>