logo

pleroma-fe

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

user_reporting_modal.vue (3656B)


  1. <template>
  2. <Modal
  3. v-if="isOpen"
  4. @backdropClicked="closeModal"
  5. >
  6. <div class="user-reporting-panel panel">
  7. <div class="panel-heading">
  8. <i18n-t
  9. tag="div"
  10. keypath="user_reporting.title"
  11. class="title"
  12. >
  13. <UserLink :user="user" />
  14. </i18n-t>
  15. </div>
  16. <div class="panel-body">
  17. <div class="user-reporting-panel-left">
  18. <div>
  19. <p>{{ $t('user_reporting.add_comment_description') }}</p>
  20. <textarea
  21. v-model="comment"
  22. class="input form-control"
  23. :placeholder="$t('user_reporting.additional_comments')"
  24. rows="1"
  25. @input="resize"
  26. />
  27. </div>
  28. <div v-if="!user.is_local">
  29. <p>{{ $t('user_reporting.forward_description') }}</p>
  30. <Checkbox v-model="forward">
  31. {{ $t('user_reporting.forward_to', [remoteInstance]) }}
  32. </Checkbox>
  33. </div>
  34. <div>
  35. <button
  36. class="btn button-default"
  37. :disabled="processing"
  38. @click="reportUser"
  39. >
  40. {{ $t('user_reporting.submit') }}
  41. </button>
  42. <div
  43. v-if="error"
  44. class="alert error"
  45. >
  46. {{ $t('user_reporting.generic_error') }}
  47. </div>
  48. </div>
  49. </div>
  50. <div class="user-reporting-panel-right">
  51. <List :items="statuses">
  52. <template #item="{item}">
  53. <div class="status-fadein user-reporting-panel-sitem">
  54. <Status
  55. :in-conversation="false"
  56. :focused="false"
  57. :statusoid="item"
  58. />
  59. <Checkbox
  60. :model-value="isChecked(item.id)"
  61. @update:model-value="checked => toggleStatus(checked, item.id)"
  62. />
  63. </div>
  64. </template>
  65. </List>
  66. </div>
  67. </div>
  68. </div>
  69. </Modal>
  70. </template>
  71. <script src="./user_reporting_modal.js"></script>
  72. <style lang="scss">
  73. .user-reporting-panel {
  74. width: 90vw;
  75. max-width: 700px;
  76. min-height: 20vh;
  77. max-height: 80vh;
  78. .panel-body {
  79. display: flex;
  80. flex-direction: column-reverse;
  81. border-top: 1px solid;
  82. border-color: var(--border);
  83. overflow: hidden;
  84. }
  85. &-left {
  86. padding: 1.1em 0.7em 0.7em;
  87. line-height: var(--post-line-height);
  88. box-sizing: border-box;
  89. > div {
  90. margin-bottom: 1em;
  91. &:last-child {
  92. margin-bottom: 0;
  93. }
  94. }
  95. p {
  96. margin-top: 0;
  97. }
  98. textarea.form-control {
  99. line-height: 16px;
  100. resize: none;
  101. overflow: hidden;
  102. transition: min-height 200ms 100ms;
  103. min-height: 44px;
  104. width: 100%;
  105. }
  106. .btn {
  107. min-width: 10em;
  108. padding: 0 2em;
  109. }
  110. .alert {
  111. margin: 1em 0 0;
  112. line-height: 1.3em;
  113. }
  114. }
  115. &-right {
  116. display: flex;
  117. flex-direction: column;
  118. overflow-y: auto;
  119. }
  120. &-sitem {
  121. display: flex;
  122. justify-content: space-between;
  123. /* TODO cleanup this */
  124. > .Status {
  125. flex: 1;
  126. }
  127. > .checkbox {
  128. margin: 0.75em;
  129. }
  130. }
  131. @media all and (min-width: 801px) {
  132. .panel-body {
  133. flex-direction: row;
  134. }
  135. &-left {
  136. width: 50%;
  137. max-width: 320px;
  138. border-right: 1px solid;
  139. border-color: var(--border);
  140. padding: 1.1em;
  141. > div {
  142. margin-bottom: 2em;
  143. }
  144. }
  145. &-right {
  146. width: 50%;
  147. flex: 1 1 auto;
  148. margin-bottom: 12px;
  149. }
  150. }
  151. }
  152. </style>