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 (4282B)


  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. <div
  13. v-if="relationship.showing_reblogs"
  14. class="menu-item dropdown-item"
  15. >
  16. <button
  17. class="main-button"
  18. @click="hideRepeats"
  19. >
  20. {{ $t('user_card.hide_repeats') }}
  21. </button>
  22. </div>
  23. <div
  24. v-if="!relationship.showing_reblogs"
  25. class="menu-item dropdown-item"
  26. >
  27. <button
  28. class="main-button"
  29. @click="showRepeats"
  30. >
  31. {{ $t('user_card.show_repeats') }}
  32. </button>
  33. </div>
  34. <div
  35. role="separator"
  36. class="dropdown-divider"
  37. />
  38. </template>
  39. <UserListMenu :user="user" />
  40. <div
  41. v-if="relationship.followed_by"
  42. class="menu-item dropdown-item"
  43. >
  44. <button
  45. class="main-button"
  46. @click="removeUserFromFollowers"
  47. >
  48. {{ $t('user_card.remove_follower') }}
  49. </button>
  50. </div>
  51. <div class="menu-item dropdown-item">
  52. <button
  53. v-if="relationship.blocking"
  54. class="main-button"
  55. @click="unblockUser"
  56. >
  57. {{ $t('user_card.unblock') }}
  58. </button>
  59. <button
  60. v-else
  61. class="main-button"
  62. @click="blockUser"
  63. >
  64. {{ $t('user_card.block') }}
  65. </button>
  66. </div>
  67. <div class="menu-item dropdown-item">
  68. <button
  69. class="main-button"
  70. @click="reportUser"
  71. >
  72. {{ $t('user_card.report') }}
  73. </button>
  74. </div>
  75. <div
  76. v-if="pleromaChatMessagesAvailable"
  77. class="menu-item dropdown-item"
  78. >
  79. <button
  80. class="main-button"
  81. @click="openChat"
  82. >
  83. {{ $t('user_card.message') }}
  84. </button>
  85. </div>
  86. </div>
  87. </template>
  88. <template #trigger>
  89. <button class="button-unstyled ellipsis-button">
  90. <FAIcon
  91. class="icon"
  92. icon="ellipsis-v"
  93. />
  94. </button>
  95. </template>
  96. </Popover>
  97. <teleport to="#modal">
  98. <confirm-modal
  99. v-if="showingConfirmBlock"
  100. :title="$t('user_card.block_confirm_title')"
  101. :confirm-text="$t('user_card.block_confirm_accept_button')"
  102. :cancel-text="$t('user_card.block_confirm_cancel_button')"
  103. @accepted="doBlockUser"
  104. @cancelled="hideConfirmBlock"
  105. >
  106. <i18n-t
  107. keypath="user_card.block_confirm"
  108. tag="span"
  109. scope="global"
  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. <teleport to="#modal">
  120. <confirm-modal
  121. v-if="showingConfirmRemoveFollower"
  122. :title="$t('user_card.remove_follower_confirm_title')"
  123. :confirm-text="$t('user_card.remove_follower_confirm_accept_button')"
  124. :cancel-text="$t('user_card.remove_follower_confirm_cancel_button')"
  125. @accepted="doRemoveUserFromFollowers"
  126. @cancelled="hideConfirmRemoveUserFromFollowers"
  127. >
  128. <i18n-t
  129. keypath="user_card.remove_follower_confirm"
  130. tag="span"
  131. scope="global"
  132. >
  133. <template #user>
  134. <span
  135. v-text="user.screen_name_ui"
  136. />
  137. </template>
  138. </i18n-t>
  139. </confirm-modal>
  140. </teleport>
  141. </div>
  142. </template>
  143. <script src="./account_actions.js"></script>
  144. <style lang="scss">
  145. .AccountActions {
  146. .ellipsis-button {
  147. width: 2.5em;
  148. margin: -0.5em 0;
  149. padding: 0.5em 0;
  150. text-align: center;
  151. }
  152. }
  153. </style>