logo

pleroma-fe

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

timeline.vue (4291B)


  1. <template>
  2. <div :class="['Timeline', classes.root]">
  3. <div
  4. v-if="!embedded"
  5. :class="classes.header"
  6. >
  7. <TimelineMenu
  8. v-if="!embedded"
  9. :timeline-name="timelineName"
  10. />
  11. <div
  12. v-if="showScrollTop"
  13. class="rightside-button"
  14. >
  15. <button
  16. class="button-unstyled scroll-to-top-button"
  17. type="button"
  18. :title="$t('general.scroll_to_top')"
  19. @click="scrollToTop"
  20. >
  21. <FALayers class="fa-scale-110 fa-old-padding-layer">
  22. <FAIcon icon="arrow-up" />
  23. <FAIcon
  24. icon="minus"
  25. transform="up-7"
  26. />
  27. </FALayers>
  28. </button>
  29. </div>
  30. <template v-if="mobileLayout">
  31. <div
  32. v-if="showLoadButton"
  33. class="rightside-button"
  34. >
  35. <button
  36. class="button-unstyled loadmore-button"
  37. :title="loadButtonString"
  38. @click.prevent="showNewStatuses"
  39. >
  40. <FAIcon
  41. fixed-width
  42. icon="circle-plus"
  43. />
  44. <div class="badge -counter">
  45. {{ mobileLoadButtonString }}
  46. </div>
  47. </button>
  48. </div>
  49. <div
  50. v-else
  51. class="loadmore-text faint veryfaint rightside-icon"
  52. :title="$t('timeline.up_to_date')"
  53. :aria-disabled="true"
  54. @click.prevent
  55. >
  56. <FAIcon
  57. fixed-width
  58. icon="check"
  59. />
  60. </div>
  61. </template>
  62. <template v-else>
  63. <button
  64. v-if="showLoadButton"
  65. class="button-default loadmore-button"
  66. @click.prevent="showNewStatuses"
  67. >
  68. {{ loadButtonString }}
  69. </button>
  70. <div
  71. v-else
  72. class="loadmore-text faint"
  73. @click.prevent
  74. >
  75. {{ $t('timeline.up_to_date') }}
  76. </div>
  77. </template>
  78. <QuickFilterSettings
  79. v-if="!mobileLayout"
  80. class="rightside-button"
  81. />
  82. <QuickViewSettings
  83. class="rightside-button"
  84. />
  85. </div>
  86. <div :class="classes.body">
  87. <div
  88. ref="timeline"
  89. class="timeline"
  90. role="feed"
  91. >
  92. <conversation
  93. v-for="statusId in filteredPinnedStatusIds"
  94. :key="statusId + '-pinned'"
  95. role="listitem"
  96. class="status-fadein"
  97. :status-id="statusId"
  98. :collapsable="true"
  99. :pinned-status-ids-object="pinnedStatusIdsObject"
  100. :in-profile="inProfile"
  101. :profile-user-id="userId"
  102. />
  103. <conversation
  104. v-for="status in filteredVisibleStatuses"
  105. :key="status.id"
  106. role="listitem"
  107. class="status-fadein"
  108. :status-id="status.id"
  109. :collapsable="true"
  110. :in-profile="inProfile"
  111. :profile-user-id="userId"
  112. :virtual-hidden="virtualScrollingEnabled && !statusesToDisplay.includes(status.id)"
  113. />
  114. </div>
  115. </div>
  116. <div :class="classes.footer">
  117. <teleport
  118. :to="footerSlipgate"
  119. :disabled="!embedded || !footerSlipgate"
  120. >
  121. <div
  122. v-if="count===0"
  123. class="new-status-notification text-center faint"
  124. >
  125. {{ $t('timeline.no_statuses') }}
  126. </div>
  127. <div
  128. v-else-if="bottomedOut"
  129. class="new-status-notification text-center faint"
  130. >
  131. {{ $t('timeline.no_more_statuses') }}
  132. </div>
  133. <button
  134. v-else-if="!timeline.loading"
  135. class="button-unstyled -link"
  136. @click.prevent="fetchOlderStatuses()"
  137. >
  138. <div class="new-status-notification text-center">
  139. {{ $t('timeline.load_older') }}
  140. </div>
  141. </button>
  142. <div
  143. v-else
  144. class="new-status-notification text-center"
  145. >
  146. <FAIcon
  147. icon="circle-notch"
  148. spin
  149. size="lg"
  150. />
  151. </div>
  152. </teleport>
  153. <!-- spacer to avoid having empty shrug -->
  154. <span v-if="embedded && footerSlipgate" />
  155. </div>
  156. </div>
  157. </template>
  158. <script src="./timeline.js"></script>
  159. <style src="./timeline.scss" lang="scss"> </style>