logo

pleroma-fe

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

user_list_popover.vue (1716B)


  1. <template>
  2. <Popover
  3. trigger="hover"
  4. placement="top"
  5. :offset="{ y: 5 }"
  6. >
  7. <template #trigger>
  8. <slot />
  9. </template>
  10. <template #content>
  11. <div class="user-list-popover">
  12. <template v-if="users.length">
  13. <div
  14. v-for="(user) in usersCapped"
  15. :key="user.id"
  16. class="user-list-row"
  17. >
  18. <UserAvatar
  19. :user="user"
  20. class="avatar-small"
  21. :compact="true"
  22. />
  23. <div class="user-list-names">
  24. <!-- eslint-disable vue/no-v-html -->
  25. <RichContent
  26. class="username"
  27. :title="'@'+user.screen_name_ui"
  28. :html="user.name_html"
  29. :emoji="user.emoji"
  30. />
  31. <!-- eslint-enable vue/no-v-html -->
  32. <span class="user-list-screen-name">{{ user.screen_name_ui }}</span><UnicodeDomainIndicator :user="user" />
  33. </div>
  34. </div>
  35. </template>
  36. <template v-else>
  37. <FAIcon
  38. icon="circle-notch"
  39. spin
  40. size="3x"
  41. />
  42. </template>
  43. </div>
  44. </template>
  45. </Popover>
  46. </template>
  47. <script src="./user_list_popover.js"></script>
  48. <style lang="scss">
  49. .user-list-popover {
  50. padding: 0.5em;
  51. --emoji-size: 16px;
  52. .user-list-row {
  53. padding: 0.25em;
  54. display: flex;
  55. flex-direction: row;
  56. .user-list-names {
  57. display: flex;
  58. flex-direction: column;
  59. margin-left: 0.5em;
  60. min-width: 5em;
  61. img {
  62. width: 1em;
  63. height: 1em;
  64. }
  65. }
  66. .user-list-screen-name {
  67. font-size: 0.65em;
  68. }
  69. }
  70. }
  71. </style>