mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-09 14:22:33 +02:00
dense chat messages.
This commit is contained in:
parent
450cfe134d
commit
a7ab37a4f5
2 changed files with 24 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue