logo

pleroma-fe

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

mutes_and_blocks_tab.vue (4998B)


  1. <template>
  2. <tab-switcher
  3. :scrollable-tabs="true"
  4. class="mutes-and-blocks-tab"
  5. >
  6. <div :label="$t('settings.blocks_tab')">
  7. <div class="usersearch-wrapper">
  8. <Autosuggest
  9. :filter="filterUnblockedUsers"
  10. :query="queryUserIds"
  11. :placeholder="$t('settings.search_user_to_block')"
  12. >
  13. <template #default="row">
  14. <BlockCard
  15. :user-id="row.item"
  16. />
  17. </template>
  18. </Autosuggest>
  19. </div>
  20. <BlockList
  21. :refresh="true"
  22. :get-key="i => i"
  23. >
  24. <template #header="{selected}">
  25. <div class="bulk-actions">
  26. <ProgressButton
  27. v-if="selected.length > 0"
  28. class="btn button-default bulk-action-button"
  29. :click="() => blockUsers(selected)"
  30. >
  31. {{ $t('user_card.block') }}
  32. <template #progress>
  33. {{ $t('user_card.block_progress') }}
  34. </template>
  35. </ProgressButton>
  36. <ProgressButton
  37. v-if="selected.length > 0"
  38. class="btn button-default"
  39. :click="() => unblockUsers(selected)"
  40. >
  41. {{ $t('user_card.unblock') }}
  42. <template #progress>
  43. {{ $t('user_card.unblock_progress') }}
  44. </template>
  45. </ProgressButton>
  46. </div>
  47. </template>
  48. <template #item="{item}">
  49. <BlockCard :user-id="item" />
  50. </template>
  51. <template #empty>
  52. {{ $t('settings.no_blocks') }}
  53. </template>
  54. </BlockList>
  55. </div>
  56. <div :label="$t('settings.mutes_tab')">
  57. <tab-switcher>
  58. <div :label="$t('settings.user_mutes')">
  59. <div class="usersearch-wrapper">
  60. <Autosuggest
  61. :filter="filterUnMutedUsers"
  62. :query="queryUserIds"
  63. :placeholder="$t('settings.search_user_to_mute')"
  64. >
  65. <template #default="row">
  66. <MuteCard
  67. :user-id="row.item"
  68. />
  69. </template>
  70. </Autosuggest>
  71. </div>
  72. <MuteList
  73. :refresh="true"
  74. :get-key="i => i"
  75. >
  76. <template #header="{selected}">
  77. <div class="bulk-actions">
  78. <ProgressButton
  79. v-if="selected.length > 0"
  80. class="btn button-default"
  81. :click="() => muteUsers(selected)"
  82. >
  83. {{ $t('user_card.mute') }}
  84. <template #progress>
  85. {{ $t('user_card.mute_progress') }}
  86. </template>
  87. </ProgressButton>
  88. <ProgressButton
  89. v-if="selected.length > 0"
  90. class="btn button-default"
  91. :click="() => unmuteUsers(selected)"
  92. >
  93. {{ $t('user_card.unmute') }}
  94. <template #progress>
  95. {{ $t('user_card.unmute_progress') }}
  96. </template>
  97. </ProgressButton>
  98. </div>
  99. </template>
  100. <template #item="{item}">
  101. <MuteCard :user-id="item" />
  102. </template>
  103. <template #empty>
  104. {{ $t('settings.no_mutes') }}
  105. </template>
  106. </MuteList>
  107. </div>
  108. <div :label="$t('settings.domain_mutes')">
  109. <div class="domain-mute-form">
  110. <Autosuggest
  111. :filter="filterUnMutedDomains"
  112. :query="queryKnownDomains"
  113. :placeholder="$t('settings.type_domains_to_mute')"
  114. >
  115. <template #default="row">
  116. <DomainMuteCard
  117. :domain="row.item"
  118. />
  119. </template>
  120. </Autosuggest>
  121. </div>
  122. <DomainMuteList
  123. :refresh="true"
  124. :get-key="i => i"
  125. >
  126. <template #header="{selected}">
  127. <div class="bulk-actions">
  128. <ProgressButton
  129. v-if="selected.length > 0"
  130. class="btn button-default"
  131. :click="() => unmuteDomains(selected)"
  132. >
  133. {{ $t('domain_mute_card.unmute') }}
  134. <template #progress>
  135. {{ $t('domain_mute_card.unmute_progress') }}
  136. </template>
  137. </ProgressButton>
  138. </div>
  139. </template>
  140. <template #item="{item}">
  141. <DomainMuteCard :domain="item" />
  142. </template>
  143. <template #empty>
  144. {{ $t('settings.no_mutes') }}
  145. </template>
  146. </DomainMuteList>
  147. </div>
  148. </tab-switcher>
  149. </div>
  150. </tab-switcher>
  151. </template>
  152. <script src="./mutes_and_blocks_tab.js"></script>
  153. <style lang="scss" src="./mutes_and_blocks_tab.scss"></style>