Finished up with toke logic.
This commit is contained in:
parent
d85f906a69
commit
ffd2094f16
5 changed files with 60 additions and 14 deletions
|
|
@ -151,6 +151,7 @@ p.panel-head-element{
|
|||
.chat-entry{
|
||||
display: flex;
|
||||
align-content: center;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.chat-entry-username{
|
||||
|
|
@ -196,7 +197,7 @@ span.user-entry{
|
|||
}
|
||||
|
||||
.whisper{
|
||||
font-size: 0.7em;
|
||||
font-size: 7pt;
|
||||
}
|
||||
|
||||
.announcement{
|
||||
|
|
@ -259,4 +260,13 @@ span.user-entry{
|
|||
height: 2em;
|
||||
padding: 0;
|
||||
margin: 0.5em;
|
||||
}
|
||||
|
||||
.toke{
|
||||
text-align: center;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.tokewhisper{
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
|
@ -228,7 +228,6 @@ p.channel-guide-entry-item{
|
|||
.chat-entry{
|
||||
background-color: var(--bg2);
|
||||
border-bottom: 1px solid var(--bg2-alt1);
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.userlist-color0{/*green0*/
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ class chatPostprocessor{
|
|||
|
||||
handleChatType(){
|
||||
if(this.rawData.type == "whisper"){
|
||||
//add whisper class
|
||||
this.chatBody.classList.add('whisper');
|
||||
}else if(this.rawData.type == "announcement"){
|
||||
//Squash the high-level
|
||||
|
|
@ -88,11 +89,21 @@ class chatPostprocessor{
|
|||
//Get the username and make it into an announcement title (little hacky but this *IS* postprocessing)
|
||||
const userNode = this.chatEntry.querySelector('.chat-entry-username');
|
||||
userNode.innerHTML = `${userNode.innerHTML.slice(0,-2)} Announcement`;
|
||||
|
||||
//Add/remove relevant classes
|
||||
userNode.classList.remove('chat-entry-username');
|
||||
userNode.classList.add('announcement-title');
|
||||
this.chatBody.classList.add('announcement-body');
|
||||
this.chatEntry.classList.add('announcement');
|
||||
}else if(this.rawData.type == "toke" || this.rawData.type == "tokewhisper"){
|
||||
//Squash the high-level
|
||||
this.chatEntry.querySelector('.high-level').remove();
|
||||
|
||||
//remove the username
|
||||
this.chatEntry.querySelector('.chat-entry-username').remove();
|
||||
|
||||
//Add toke/tokewhisper class
|
||||
this.chatEntry.classList.add(this.rawData.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue