Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

Messages.vue 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template lang="pug">
  2. .sidebar--messages
  3. h5.message__title messages from matches
  4. router-link(
  5. :to="`/chats/${profile.profile_id}`"
  6. v-for='profile in matches'
  7. :key='profile.profile_id'
  8. :class="[pid == profile.profile_id ? 'active' : '', 'sidebar__message', 'f-col', 'start']"
  9. )
  10. .f-row.start
  11. img(:src='profile.avatar')
  12. .message__right.f-col
  13. h4.message__name {{ profile.name }}
  14. p.message__content {{ profile.metadata.rawMetadata || &quot;Hello I&apos;m using tinder!&quot; }}
  15. </template>
  16. <script>
  17. import { mixins } from '../utils'
  18. export default {
  19. name: 'ProfileMessages',
  20. mixins: [mixins.pidMixin],
  21. props: {
  22. matches: {
  23. type: [Object, Array],
  24. default: () => [],
  25. },
  26. },
  27. }
  28. </script>
  29. <style lang="postcss">
  30. /* prettier-ignore */
  31. .sidebar
  32. &--messages
  33. padding: 20px 10px
  34. /* overflow-y: scroll */
  35. text-align: left
  36. a
  37. color: black
  38. text-decoration: none
  39. &:hover
  40. background: #f9f9ff
  41. transition: 0.5s
  42. &.active
  43. background: #ececff
  44. transition: 0.5s
  45. &__message
  46. display: flex
  47. align-items: center
  48. margin: 20px 0
  49. img
  50. object-fit: cover
  51. width: 70px
  52. height: 70px
  53. border-radius: 50%
  54. .message
  55. &__title
  56. color: #fd5068
  57. text-transform: uppercase
  58. margin-bottom: 10px
  59. &__right
  60. margin-left: 10px
  61. &__name
  62. padding-top: 5px
  63. font-weight: 600
  64. &__content
  65. padding-top: 10px
  66. line-height: 1em
  67. </style>