diff options
| author | eugenijm <eugenijm@protonmail.com> | 2020-05-07 16:10:53 +0300 |
|---|---|---|
| committer | eugenijm <eugenijm@protonmail.com> | 2020-07-08 15:21:31 +0300 |
| commit | aa2cf51c05ebdf411d74af5debbbc8fa4d3cf457 (patch) | |
| tree | 6032c3ee359b20cefca000df93b59787fc0d54d9 /src/components/chat_title/chat_title.vue | |
| parent | a0ddcbdf5b19f658bc07086beaa4034a6309fe3b (diff) | |
Add Chats
Diffstat (limited to 'src/components/chat_title/chat_title.vue')
| -rw-r--r-- | src/components/chat_title/chat_title.vue | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/components/chat_title/chat_title.vue b/src/components/chat_title/chat_title.vue new file mode 100644 index 00000000..fd42d125 --- /dev/null +++ b/src/components/chat_title/chat_title.vue @@ -0,0 +1,56 @@ +<template> + <!-- eslint-disable vue/no-v-html --> + <div + class="chat-title" + :title="title" + > + <ChatAvatar + v-if="withAvatar" + :user="user" + width="23px" + height="23px" + /> + <span + v-if="withAvatar" + style="margin-right: 0.5em" + /> + <span + class="username" + v-html="htmlTitle" + /> + </div> + <!-- eslint-enable vue/no-v-html --> +</template> + +<script src="./chat_title.js"></script> + +<style lang="scss"> +@import '../../_variables.scss'; + +.chat-title { + display: flex; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + a { + display: flex; + align-items: center; + } + + .username { + max-width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + display: inline; + word-wrap: break-word; + + .emoji { + width: 14px; + height: 14px; + vertical-align: middle; + object-fit: contain + } + } +} +</style> |
