highLevel syncs across chans, shows in userlist

This commit is contained in:
rainbow napkin 2024-12-03 20:27:37 -05:00
parent 279640a7e7
commit 8ccb9003cc
8 changed files with 102 additions and 38 deletions

View file

@ -88,20 +88,34 @@ class userList{
this.colorMap = newMap;
}
renderUser(user, color){
var userEntry = document.createElement('p');
renderUser(user, flair){
//Create user span
var userSpan = document.createElement('span');
userSpan.classList.add('chat-panel-users', 'user-entry');
//Create high-level label
var highLevel = document.createElement('p');
highLevel.classList.add("user-list-high-level","high-level");
highLevel.innerHTML = `${user.highLevel}`;
userSpan.appendChild(highLevel);
//Create nameplate
var userEntry = document.createElement('p');
userEntry.innerText = user.user;
userEntry.id = `user-entry-${user.user}`;
//Override color with flair
if(user.flair != "classic"){
color = `flair-${user.flair}`;
flair = `flair-${user.flair}`;
}
//Add classes to classList
userEntry.classList.add("chat-panel-users","user-entry",flair);
userEntry.classList.add("chat-panel-users","user-entry",color);
userSpan.appendChild(userEntry);
this.userList.appendChild(userEntry);
this.userList.appendChild(userSpan);
}
toggleUI(show = this.userDiv.style.display == "none"){