logo

pleroma-fe

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

action_button_container.vue (2708B)


  1. <template>
  2. <div>
  3. <Popover
  4. v-if="button.dropdown?.()"
  5. trigger="hover"
  6. :offset="{ y: 5 }"
  7. :placement="$attrs.extra ? 'right' : 'top'"
  8. >
  9. <template #trigger>
  10. <ActionButton
  11. :button="button"
  12. :status="status"
  13. v-bind.prop="$attrs"
  14. />
  15. </template>
  16. <template #content>
  17. <div
  18. v-if="button.name === 'mute'"
  19. :id="`popup-menu-${randomSeed}`"
  20. class="dropdown-menu"
  21. role="menu"
  22. >
  23. <div class="menu-item dropdown-item extra-action -icon">
  24. <button
  25. class="main-button"
  26. @click="toggleUserMute"
  27. >
  28. <FAIcon
  29. icon="user"
  30. fixed-width
  31. />
  32. <template v-if="userIsMuted">
  33. {{ $t('status.unmute_user') }}
  34. </template>
  35. <template v-else>
  36. {{ $t('status.mute_user') }}
  37. </template>
  38. </button>
  39. </div>
  40. <div class="menu-item dropdown-item extra-action -icon">
  41. <button
  42. class="main-button"
  43. @click="toggleUserMute"
  44. >
  45. <FAIcon
  46. icon="folder-tree"
  47. fixed-width
  48. />
  49. <template v-if="threadIsMuted">
  50. {{ $t('status.unmute_conversation') }}
  51. </template>
  52. <template v-else>
  53. {{ $t('status.mute_conversation') }}
  54. </template>
  55. </button>
  56. </div>
  57. <div class="menu-item dropdown-item extra-action -icon">
  58. <button
  59. class="main-button"
  60. @click="toggleDomainMute"
  61. >
  62. <FAIcon
  63. icon="globe"
  64. fixed-width
  65. />
  66. <template v-if="domainIsMuted">
  67. {{ $t('status.unmute_domain') }}
  68. </template>
  69. <template v-else>
  70. {{ $t('status.mute_domain') }}
  71. </template>
  72. </button>
  73. </div>
  74. </div>
  75. </template>
  76. </Popover>
  77. <ActionButton
  78. v-else
  79. :button="button"
  80. :status="status"
  81. v-bind="$attrs"
  82. />
  83. <teleport to="#modal">
  84. <mute-confirm
  85. ref="confirmConversation"
  86. type="conversation"
  87. :status="status"
  88. />
  89. <mute-confirm
  90. ref="confirmDomain"
  91. type="domain"
  92. :user="user"
  93. />
  94. <mute-confirm
  95. ref="confirmUser"
  96. type="user"
  97. :user="user"
  98. />
  99. </teleport>
  100. </div>
  101. </template>
  102. <script src="./action_button_container.js" />