logo

pleroma-fe

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

account_actions.vue (3730B)


  1. <template>
  2. <div class="AccountActions">
  3. <Popover
  4. trigger="click"
  5. placement="bottom"
  6. :bound-to="{ x: 'container' }"
  7. remove-padding
  8. >
  9. <template #content>
  10. <div class="dropdown-menu">
  11. <template v-if="relationship.following">
  12. <button
  13. v-if="relationship.showing_reblogs"
  14. class="dropdown-item menu-item"
  15. @click="hideRepeats"
  16. >
  17. {{ $t('user_card.hide_repeats') }}
  18. </button>
  19. <button
  20. v-if="!relationship.showing_reblogs"
  21. class="dropdown-item menu-item"
  22. @click="showRepeats"
  23. >
  24. {{ $t('user_card.show_repeats') }}
  25. </button>
  26. <div
  27. role="separator"
  28. class="dropdown-divider"
  29. />
  30. </template>
  31. <UserListMenu :user="user" />
  32. <button
  33. v-if="relationship.followed_by"
  34. class="dropdown-item menu-item"
  35. @click="removeUserFromFollowers"
  36. >
  37. {{ $t('user_card.remove_follower') }}
  38. </button>
  39. <button
  40. v-if="relationship.blocking"
  41. class="dropdown-item menu-item"
  42. @click="unblockUser"
  43. >
  44. {{ $t('user_card.unblock') }}
  45. </button>
  46. <button
  47. v-else
  48. class="dropdown-item menu-item"
  49. @click="blockUser"
  50. >
  51. {{ $t('user_card.block') }}
  52. </button>
  53. <button
  54. class="dropdown-item menu-item"
  55. @click="reportUser"
  56. >
  57. {{ $t('user_card.report') }}
  58. </button>
  59. <button
  60. v-if="pleromaChatMessagesAvailable"
  61. class="dropdown-item menu-item"
  62. @click="openChat"
  63. >
  64. {{ $t('user_card.message') }}
  65. </button>
  66. </div>
  67. </template>
  68. <template #trigger>
  69. <button class="button-unstyled ellipsis-button">
  70. <FAIcon
  71. class="icon"
  72. icon="ellipsis-v"
  73. />
  74. </button>
  75. </template>
  76. </Popover>
  77. <teleport to="#modal">
  78. <confirm-modal
  79. v-if="showingConfirmBlock"
  80. :title="$t('user_card.block_confirm_title')"
  81. :confirm-text="$t('user_card.block_confirm_accept_button')"
  82. :cancel-text="$t('user_card.block_confirm_cancel_button')"
  83. @accepted="doBlockUser"
  84. @cancelled="hideConfirmBlock"
  85. >
  86. <i18n-t
  87. keypath="user_card.block_confirm"
  88. tag="span"
  89. >
  90. <template #user>
  91. <span
  92. v-text="user.screen_name_ui"
  93. />
  94. </template>
  95. </i18n-t>
  96. </confirm-modal>
  97. </teleport>
  98. <teleport to="#modal">
  99. <confirm-modal
  100. v-if="showingConfirmRemoveFollower"
  101. :title="$t('user_card.remove_follower_confirm_title')"
  102. :confirm-text="$t('user_card.remove_follower_confirm_accept_button')"
  103. :cancel-text="$t('user_card.remove_follower_confirm_cancel_button')"
  104. @accepted="doRemoveUserFromFollowers"
  105. @cancelled="hideConfirmRemoveUserFromFollowers"
  106. >
  107. <i18n-t
  108. keypath="user_card.remove_follower_confirm"
  109. tag="span"
  110. >
  111. <template #user>
  112. <span
  113. v-text="user.screen_name_ui"
  114. />
  115. </template>
  116. </i18n-t>
  117. </confirm-modal>
  118. </teleport>
  119. </div>
  120. </template>
  121. <script src="./account_actions.js"></script>
  122. <style lang="scss">
  123. .AccountActions {
  124. .ellipsis-button {
  125. width: 2.5em;
  126. margin: -0.5em 0;
  127. padding: 0.5em 0;
  128. text-align: center;
  129. }
  130. }
  131. </style>