Reply GUI
This commit is contained in:
parent
a05c74bb3c
commit
e49360fba1
8 changed files with 116 additions and 22 deletions
|
@ -40,13 +40,8 @@ class Message{
|
|||
Message.contextmenu.addbutton("Copy raw text",function(){
|
||||
navigator.clipboard.writeText(this.content);
|
||||
});
|
||||
Message.contextmenu.addbutton("Reply",function(div){
|
||||
if(this.channel.replyingto){
|
||||
this.channel.replyingto.classList.remove("replying");
|
||||
}
|
||||
this.channel.replyingto=div;
|
||||
console.log(div);
|
||||
this.channel.replyingto.classList.add("replying");
|
||||
Message.contextmenu.addbutton("Reply",function(this:Message,div:HTMLDivElement){
|
||||
this.channel.setReplying(this);
|
||||
});
|
||||
Message.contextmenu.addbutton("Copy message id",function(){
|
||||
navigator.clipboard.writeText(this.id);
|
||||
|
@ -168,6 +163,9 @@ class Message{
|
|||
premessage=this.channel.messages[this.channel.messages.indexOf(this)+1];
|
||||
}
|
||||
const div=this.div;
|
||||
if(this===this.channel.replyingto){
|
||||
div.classList.add("replying");
|
||||
}
|
||||
div.innerHTML="";
|
||||
const build = document.createElement('table');
|
||||
if(this.message_reference){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue