You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Messages.vue 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template lang="pug">
  2. .sidebar__messages
  3. h4.message__title {{ title }}
  4. router-link(:to="'/chats/' + user.uid" v-for='user in users' :key='user.uid' :class="[uid == user.uid ? 'active' : '', 'sidebar__message', 'f-col', 'start']")
  5. .f-row.start
  6. img(:src='user.avatar')
  7. .message__right.f-col
  8. h4.message__name {{ user.name }}
  9. p.message__content
  10. | {{ user.metadata.rawMetadata || &quot;Hello I&apos;m using tinder!&quot; }}
  11. </template>
  12. <script>
  13. export default {
  14. name: 'messages',
  15. props: {
  16. title: { type: String, default: 'Messages' },
  17. users: {
  18. type: [Object, Array],
  19. },
  20. },
  21. computed: {
  22. uid() {
  23. return this.$route.params.uid
  24. },
  25. },
  26. }
  27. </script>
  28. <style lang="postcss">
  29. .sidebar
  30. &__messages
  31. padding: 20px 10px
  32. /* overflow-y: scroll */
  33. a
  34. color: black
  35. text-decoration: none
  36. &:hover
  37. background: #f9f9ff
  38. transition: 0.5s
  39. &.active
  40. background: #ececff
  41. transition: 0.5s
  42. &__message
  43. display: flex
  44. align-items: center
  45. margin: 20px 0
  46. img
  47. object-fit: cover
  48. width: 70px
  49. height: 70px
  50. .message
  51. &__title
  52. color: #fd5068
  53. margin-bottom: 10px
  54. &__right
  55. margin-left: 10px
  56. &__name
  57. margin-bottom: 10px
  58. </style>