aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_title/chat_title.vue
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2020-07-10 09:04:45 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2020-07-10 09:04:45 +0000
commitc1a20079bef51dc38cb9826cee5bb2fbfe2cf68b (patch)
treedeed4aa330bcc8b983855df3a24c23ddb4bfeeb8 /src/components/chat_title/chat_title.vue
parentd2f0e4e7d515afe4b15d4e6a0e52d9fee2349c4a (diff)
parentb756c83e8d275c0f9d210c15a319d36dca56d3c8 (diff)
Merge branch 'direct-conversations' into 'develop'
Chats Closes #201 See merge request pleroma/pleroma-fe!1019
Diffstat (limited to 'src/components/chat_title/chat_title.vue')
-rw-r--r--src/components/chat_title/chat_title.vue67
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..c375b10b
--- /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
+ }
+ }
+
+ .still-image.avatar {
+ width: 23px;
+ height: 23px;
+ margin-right: 0.5em;
+
+ border-radius: $fallback--avatarAltRadius;
+ border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
+
+ &.animated::before {
+ display: none;
+ }
+ }
+}
+</style>