diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-08-27 14:45:03 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-08-27 14:45:03 +0000 |
| commit | e768ec1fca2f7580d111b0878a9695b0c8b9dbb1 (patch) | |
| tree | 668ebbcd6818b3c7ad70a372c9f77fa9cffb6a3f /src/components/chat_title/chat_title.vue | |
| parent | 5d49edc823ba2ea3e34d4fd6c5efcc84ef9712f7 (diff) | |
| parent | d09f43ba7a179cdca9a2d808631f8ba213dd7710 (diff) | |
Merge branch '2.1.0-rc0' into 'master'
2.1.0 into master
See merge request pleroma/pleroma-fe!1217
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> |
