logo

pleroma-fe

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

chat_list.vue (1206B)


  1. <template>
  2. <div v-if="isNew">
  3. <ChatNew @cancel="cancelNewChat" />
  4. </div>
  5. <div
  6. v-else
  7. class="chat-list panel panel-default"
  8. >
  9. <div class="panel-heading -sticky">
  10. <span class="title">
  11. {{ $t("chats.chats") }}
  12. </span>
  13. <button
  14. class="button-default"
  15. @click="newChat"
  16. >
  17. {{ $t("chats.new") }}
  18. </button>
  19. </div>
  20. <div class="panel-body">
  21. <div
  22. v-if="sortedChatList.length > 0"
  23. class="timeline"
  24. >
  25. <List :items="sortedChatList">
  26. <template #item="{item}">
  27. <ChatListItem
  28. :key="item.id"
  29. :compact="false"
  30. :chat="item"
  31. />
  32. </template>
  33. </List>
  34. </div>
  35. <div
  36. v-else
  37. class="emtpy-chat-list-alert"
  38. >
  39. <span>{{ $t('chats.empty_chat_list_placeholder') }}</span>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script src="./chat_list.js"></script>
  45. <style lang="scss">
  46. .chat-list {
  47. min-height: 25em;
  48. margin-bottom: 0;
  49. }
  50. .emtpy-chat-list-alert {
  51. padding: 3em;
  52. font-size: 1.2em;
  53. display: flex;
  54. justify-content: center;
  55. color: var(--textFaint);
  56. }
  57. </style>