account_actions.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 v-slot:content>
  10. <div class="dropdown-menu">
  11. <template v-if="relationship.following">
  12. <button
  13. v-if="relationship.showing_reblogs"
  14. class="btn button-default dropdown-item"
  15. @click="hideRepeats"
  16. >
  17. {{ $t('user_card.hide_repeats') }}
  18. </button>
  19. <button
  20. v-if="!relationship.showing_reblogs"
  21. class="btn button-default dropdown-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. <button
  32. v-if="relationship.blocking"
  33. class="btn button-default btn-block dropdown-item"
  34. @click="unblockUser"
  35. >
  36. {{ $t('user_card.unblock') }}
  37. </button>
  38. <button
  39. v-else
  40. class="btn button-default btn-block dropdown-item"
  41. @click="blockUser"
  42. >
  43. {{ $t('user_card.block') }}
  44. </button>
  45. <button
  46. class="btn button-default btn-block dropdown-item"
  47. @click="reportUser"
  48. >
  49. {{ $t('user_card.report') }}
  50. </button>
  51. <button
  52. v-if="pleromaChatMessagesAvailable"
  53. class="btn button-default btn-block dropdown-item"
  54. @click="openChat"
  55. >
  56. {{ $t('user_card.message') }}
  57. </button>
  58. </div>
  59. </template>
  60. <template v-slot:trigger>
  61. <button class="button-unstyled ellipsis-button">
  62. <FAIcon
  63. class="icon"
  64. icon="ellipsis-v"
  65. />
  66. </button>
  67. </template>
  68. </Popover>
  69. </div>
  70. </template>
  71. <script src="./account_actions.js"></script>
  72. <style lang="scss">
  73. @import '../../_variables.scss';
  74. .AccountActions {
  75. button.dropdown-item {
  76. margin-left: 0;
  77. }
  78. .ellipsis-button {
  79. width: 2.5em;
  80. margin: -0.5em 0;
  81. padding: 0.5em 0;
  82. text-align: center;
  83. &:not(:hover) .icon {
  84. color: $fallback--lightText;
  85. color: var(--lightText, $fallback--lightText);
  86. }
  87. }
  88. }
  89. </style>