diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-09-07 09:47:17 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-09-07 09:47:17 +0300 |
| commit | fa2b680855c790ba8ed8d7cc0dbf2a3a2e1dbaf6 (patch) | |
| tree | b2868a1c0d2fce025134af4167c824fc8ee49068 /src/components/chat_title/chat_title.vue | |
| parent | 12519a54b55140a3e5f76e67ac53914654c2a8b0 (diff) | |
| parent | a73b09c73202117ffa3fecf7a9185981d6696912 (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into develop
Diffstat (limited to 'src/components/chat_title/chat_title.vue')
| -rw-r--r-- | src/components/chat_title/chat_title.vue | 67 |
1 files changed, 67 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..b16ed39d --- /dev/null +++ b/src/components/chat_title/chat_title.vue @@ -0,0 +1,67 @@ +<template> + <!-- eslint-disable vue/no-v-html --> + <div + class="chat-title" + :title="title" + > + <router-link + v-if="withAvatar && user" + :to="getUserProfileLink(user)" + > + <UserAvatar + :user="user" + width="23px" + height="23px" + /> + </router-link> + <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; + align-items: center; + + .username { + max-width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + display: inline; + word-wrap: break-word; + overflow: hidden; + text-overflow: ellipsis; + + .emoji { + width: 14px; + height: 14px; + vertical-align: middle; + object-fit: contain + } + } + + .Avatar { + width: 23px; + height: 23px; + margin-right: 0.5em; + + border-radius: $fallback--avatarAltRadius; + border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius); + + &.animated::before { + display: none; + } + } +} +</style> |
