upd: css.container|view.vue.container.inbox (only display name on first message from same user)

This commit is contained in:
xdrm-brackets 2017-12-05 23:42:18 +01:00
parent 372d532f1b
commit 9b67c15a6b
2 changed files with 8 additions and 3 deletions

View File

@ -7,7 +7,8 @@
flex-wrap: nowrap; flex-wrap: nowrap;
} }
#CONTAINER.message div{ /* Message item */ #CONTAINER.message div,
#CONTAINER.message div[data-noauthor='1']{ /* Message item */
display: inline-block; display: inline-block;
position: relative; position: relative;
top: 0; top: 0;
@ -27,6 +28,10 @@
color: #222; color: #222;
} }
#CONTAINER.message div[data-noauthor='0']{
margin-top: .5em;
}
#CONTAINER.message div.me{ /* Message Item (self) */ #CONTAINER.message div.me{ /* Message Item (self) */
/* background: #13d89d; */ /* background: #13d89d; */
align-self: flex-end; align-self: flex-end;

View File

@ -2,8 +2,8 @@
<div id='CONTAINER' class='message'> <div id='CONTAINER' class='message'>
<div v-for='msg in gstore.notif[1].data' :class="msg[0] == gstore.server.session.name ? 'me' : ''"> <div v-for='(msg, id) in gstore.notif[1].data' :class="msg[0] == gstore.server.session.name ? 'me' : ''" :data-noauthor='id == 0 || gstore.notif[1].data[id-1][0] != gstore.notif[1].data[id][0] ? "1" : "0"'>
<span class='author' v-text='msg[0]'></span> <span class='author' v-text='msg[0]' v-if='id == 0 || gstore.notif[1].data[id-1][0] != gstore.notif[1].data[id][0]'></span>
<span class='content' v-html='bbcode(msg[1])'></span> <span class='content' v-html='bbcode(msg[1])'></span>
</div> </div>