dense chat messages.

This commit is contained in:
m1k1o 2021-04-04 16:10:56 +02:00
parent 450cfe134d
commit a7ab37a4f5
2 changed files with 24 additions and 2 deletions

View File

@ -66,6 +66,7 @@ For n.eko room management software visit https://github.com/m1k1o/neko-rooms.
- Abiltiy to include neko as a component in another Vue.Js project (by @gbrian).
- Added HEALTHCHECK to Dockerfile.
- Arguments in broadcast pipeline are optional, not positional and can be repeated `{url} {device} {display}`.
- Chat messages are dense, when repeated, they are joined together.
### Roadmap & TODOs
- Catch errors from gst pipeline, tell user if broadcast failed.

View File

@ -2,7 +2,14 @@
<div class="chat">
<ul class="chat-history" ref="history" @click="onClick">
<template v-for="(message, index) in history">
<li :key="index" class="message" v-if="message.type === 'text'">
<li
:key="index"
class="message"
v-if="message.type === 'text'"
:class="{
bulk: index > 0 && history[index - 1].id == message.id && history[index - 1].type === 'text',
}"
>
<div class="author" @contextmenu.stop.prevent="onContext($event, { member: member(message.id) })">
<neko-avatar class="avatar" :seed="member(message.id).displayname" :size="40" />
</div>
@ -94,6 +101,7 @@
word-wrap: break-word;
&.message {
padding-top: 15px;
font-size: 16px;
.author {
@ -104,7 +112,7 @@
height: 40px;
border-radius: 50%;
background: $style-primary;
margin: 0px 10px 10px 0px;
margin-right: 10px;
.avatar {
width: 100%;
@ -219,6 +227,19 @@
}
}
}
&.bulk {
padding-top: 0px;
.author {
visibility: hidden;
height: 0;
}
.content-head {
display: none;
}
}
}
&.event {