aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_list/chat_list.vue
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-07-13 13:25:23 -0500
committerMark Felder <feld@FreeBSD.org>2020-07-13 13:25:23 -0500
commitda94935aaa18f16ac7fbe715c4610427d68ccf72 (patch)
tree52691b7cbac2773858b245e596d56c1c5e6ea74b /src/components/chat_list/chat_list.vue
parent2eda3d687e8c986a982057c6f5eb969aa8d403d5 (diff)
parent3e09a708f600b47dde831eeddb412828b38a0cf4 (diff)
Merge branch 'develop' into refactor/notification_settings
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>