logo

pleroma-fe

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

status_body.vue (3059B)


  1. <template>
  2. <div
  3. class="StatusBody"
  4. :class="{ '-compact': compact }"
  5. >
  6. <div class="body">
  7. <div
  8. v-if="status.summary_raw_html"
  9. class="summary-wrapper"
  10. :class="{ '-tall': (longSubject && !showingLongSubject) }"
  11. >
  12. <RichContent
  13. class="media-body summary"
  14. :faint="compact"
  15. :html="status.summary_raw_html"
  16. :emoji="status.emojis"
  17. />
  18. <button
  19. v-show="longSubject && showingLongSubject"
  20. class="button-unstyled -link tall-subject-hider"
  21. @click.prevent="toggleShowingLongSubject"
  22. >
  23. {{ $t("status.hide_full_subject") }}
  24. </button>
  25. <button
  26. v-show="longSubject && !showingLongSubject"
  27. class="button-unstyled -link tall-subject-hider"
  28. @click.prevent="toggleShowingLongSubject"
  29. >
  30. {{ $t("status.show_full_subject") }}
  31. </button>
  32. </div>
  33. <div
  34. :class="{'-tall-status': hideTallStatus}"
  35. class="text-wrapper"
  36. >
  37. <button
  38. v-show="hideTallStatus"
  39. class="button-unstyled -link tall-status-hider"
  40. :class="{ '-focused': focused }"
  41. @click.prevent="toggleShowMore"
  42. >
  43. {{ $t("general.show_more") }}
  44. </button>
  45. <RichContent
  46. v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)"
  47. :class="{ '-single-line': singleLine }"
  48. class="text media-body"
  49. :html="status.raw_html"
  50. :emoji="status.emojis"
  51. :handle-links="true"
  52. :faint="compact"
  53. :greentext="mergedConfig.greentext"
  54. :attentions="status.attentions"
  55. @parseReady="onParseReady"
  56. />
  57. <button
  58. v-show="hideSubjectStatus"
  59. class="button-unstyled -link cw-status-hider"
  60. @click.prevent="toggleShowMore"
  61. >
  62. {{ $t("status.show_content") }}
  63. <FAIcon
  64. v-if="attachmentTypes.includes('image')"
  65. icon="image"
  66. />
  67. <FAIcon
  68. v-if="attachmentTypes.includes('video')"
  69. icon="video"
  70. />
  71. <FAIcon
  72. v-if="attachmentTypes.includes('audio')"
  73. icon="music"
  74. />
  75. <FAIcon
  76. v-if="attachmentTypes.includes('unknown')"
  77. icon="file"
  78. />
  79. <FAIcon
  80. v-if="status.poll && status.poll.options"
  81. icon="poll-h"
  82. />
  83. <FAIcon
  84. v-if="status.card"
  85. icon="link"
  86. />
  87. </button>
  88. <button
  89. v-show="showingMore && !fullContent"
  90. class="button-unstyled -link status-unhider"
  91. @click.prevent="toggleShowMore"
  92. >
  93. {{ tallStatus ? $t("general.show_less") : $t("status.hide_content") }}
  94. </button>
  95. </div>
  96. </div>
  97. <slot v-if="!hideSubjectStatus" />
  98. </div>
  99. </template>
  100. <script src="./status_body.js"></script>
  101. <style lang="scss" src="./status_body.scss" />