aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_list/chat_list.vue
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2020-07-10 09:04:45 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2020-07-10 09:04:45 +0000
commitc1a20079bef51dc38cb9826cee5bb2fbfe2cf68b (patch)
treedeed4aa330bcc8b983855df3a24c23ddb4bfeeb8 /src/components/chat_list/chat_list.vue
parentd2f0e4e7d515afe4b15d4e6a0e52d9fee2349c4a (diff)
parentb756c83e8d275c0f9d210c15a319d36dca56d3c8 (diff)
Merge branch 'direct-conversations' into 'develop'
Chats Closes #201 See merge request pleroma/pleroma-fe!1019
Diffstat (limited to 'src/components/chat_list/chat_list.vue')
-rw-r--r--src/components/chat_list/chat_list.vue64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/components/chat_list/chat_list.vue b/src/components/chat_list/chat_list.vue
new file mode 100644
index 00000000..17e2f795
--- /dev/null
+++ b/src/components/chat_list/chat_list.vue
@@ -0,0 +1,64 @@
+<template>
+ <div v-if="isNew">
+ <ChatNew @cancel="cancelNewChat" />
+ </div>
+ <div
+ v-else
+ class="chat-list panel panel-default"
+ >
+ <div class="panel-heading">
+ <span class="title">
+ {{ $t("chats.chats") }}
+ </span>
+ <button @click="newChat">
+ {{ $t("chats.new") }}
+ </button>
+ </div>
+ <div class="panel-body">
+ <div
+ v-if="sortedChatList.length > 0"
+ class="timeline"
+ >
+ <List :items="sortedChatList">
+ <template
+ slot="item"
+ slot-scope="{item}"
+ >
+ <ChatListItem
+ :key="item.id"
+ :compact="false"
+ :chat="item"
+ />
+ </template>
+ </List>
+ </div>
+ <div
+ v-else
+ class="emtpy-chat-list-alert"
+ >
+ <span>{{ $t('chats.empty_chat_list_placeholder') }}</span>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script src="./chat_list.js"></script>
+
+<style lang="scss">
+@import '../../_variables.scss';
+
+.chat-list {
+ min-height: 25em;
+ margin-bottom: 0;
+}
+
+.emtpy-chat-list-alert {
+ padding: 3em;
+ font-size: 1.2em;
+ display: flex;
+ justify-content: center;
+ color: $fallback--text;
+ color: var(--faint, $fallback--text);
+}
+
+</style>