concord delete message

This commit is contained in:
Killian Marty 2024-01-01 17:04:35 +01:00
parent ff70648b33
commit d57e7e4ac5
2 changed files with 26 additions and 0 deletions

View file

@ -85,6 +85,23 @@ html, body{
text-align: center; text-align: center;
} }
.concordRemoveBtn{
width: 15px;
height: 15px;
padding: 0px;
line-height: 0px;
cursor: pointer;
color: white;
background-color: transparent;
border-radius: 7.5px;
font-size: 10px;
border: 2px solid white;
box-sizing: border-box;
position: absolute;
top: 2px;
right: 2px;
}
#chatInput{ #chatInput{
width: 90%; width: 90%;
box-sizing: border-box; box-sizing: border-box;
@ -103,6 +120,7 @@ html, body{
color: white; color: white;
font-family: sans-serif; font-family: sans-serif;
margin: 3%; margin: 3%;
position: relative;
} }
.messageTitle{ .messageTitle{

View file

@ -86,6 +86,13 @@ class Phone{
h2.className = "messageTitle"; h2.className = "messageTitle";
h2.innerText = message.title; h2.innerText = message.title;
let btn = document.createElement("button");
btn.className = "concordRemoveBtn"
btn.innerText = "X"
btn.onclick = ()=>{
msg.remove();
}
let p; let p;
let match = message.content.match(/:(\w+):/); let match = message.content.match(/:(\w+):/);
if(match){ if(match){
@ -100,6 +107,7 @@ class Phone{
msg.appendChild(h2); msg.appendChild(h2);
msg.appendChild(p); msg.appendChild(p);
msg.appendChild(btn)
this.contentmsg.appendChild(msg); this.contentmsg.appendChild(msg);
this.contentmsg.scrollTop = this.contentmsg.scrollHeight; this.contentmsg.scrollTop = this.contentmsg.scrollHeight;