aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_list_item/chat_list_item.vue
blob: 0f9d5c5fa07b1e427821b1ae6ef855807a5eec0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
  <div
    class="chat-list-item"
    @click.capture.prevent="openChat"
  >
    <div class="chat-list-item-left">
      <UserAvatar
        :user="chat.account"
        height="48px"
        width="48px"
      />
    </div>
    <div class="chat-list-item-center">
      <div class="heading">
        <span
          v-if="chat.account"
          class="name-and-account-name"
        >
          <ChatTitle
            :user="chat.account"
          />
        </span>
        <span class="heading-right" />
        <div class="time-wrapper">
          <Timeago
            :time="chat.updated_at"
            :auto-update="60"
          />
        </div>
      </div>
      <div class="chat-preview">
        <StatusBody
          class="chat-preview-body"
          :status="messageForStatusContent"
          :single-line="true"
        />
        <div
          v-if="chat.unread > 0"
          class="badge -notification unread-chat-count"
        >
          {{ chat.unread }}
        </div>
      </div>
    </div>
  </div>
</template>

<script src="./chat_list_item.js"></script>

<style lang="scss">
@import "./chat_list_item";
</style>