pleroma-fe/src/components/chat_title/chat_title.vue

57 lines
929 B
Vue
Raw Normal View History

2020-05-07 23:10:53 +10:00
<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>