Messaging system #150

Merged
tonitch merged 15 commits from tonitch/Clyde:msg into master 2024-04-09 17:08:59 +02:00
Showing only changes of commit ccb954e348 - Show all commits

View File

@ -24,7 +24,8 @@
<h1 id=msgName ><input class="InputTitle" type="text" @change="updateDiscussionName(currentDiscussion.id, currentDiscussion.name)" v-model="currentDiscussion.name"></h1> <h1 id=msgName ><input class="InputTitle" type="text" @change="updateDiscussionName(currentDiscussion.id, currentDiscussion.name)" v-model="currentDiscussion.name"></h1>
<div id=msgs> <div id=msgs>
<div class="msg" v-for="msg in currentDiscussion.msgs" :sender="msg.sender" :key="msg.id"> <div class="msg" v-for="msg in currentDiscussion.msgs" :sender="msg.sender" :key="msg.id">
{{ msg.content }} {{ msg.content }}<br/>
<span class="sender" v-if="!msg.sender">{{msg.author.firstName}}</span>
</div> </div>
</div> </div>
<div id=messageBox> <div id=messageBox>
@ -176,6 +177,12 @@ div#discussion{
align-self: start; align-self: start;
} }
.sender{
display: inline-block;
color: gray;
font-size: 0.5em;
}
.msg[sender=true]{ .msg[sender=true]{
background-color: darkorange; background-color: darkorange;
align-self: end; align-self: end;