Updated userSchema to store flair by reference
This commit is contained in:
parent
108290de2d
commit
279640a7e7
7 changed files with 73 additions and 54 deletions
|
|
@ -87,7 +87,7 @@ class chatBox{
|
|||
var userLabel = document.createElement('p');
|
||||
userLabel.classList.add("chat-panel-buffer","chat-entry-username");
|
||||
|
||||
if(chat.flair != ""){
|
||||
if(chat.flair != "classic"){
|
||||
var flair = `flair-${chat.flair}`;
|
||||
}else{
|
||||
var flair = this.client.userList.colorMap.get(chat.user);
|
||||
|
|
@ -134,12 +134,6 @@ class chatBox{
|
|||
//clear current flair select
|
||||
this.flairSelect.innerHTML = "";
|
||||
|
||||
//Inject flair object for standard flair like the hack we are
|
||||
flairList.push({
|
||||
name: "",
|
||||
displayName: "Classic"
|
||||
});
|
||||
|
||||
//For each flair in flairlist
|
||||
flairList.forEach((flair) => {
|
||||
//Create an option
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class userList{
|
|||
userEntry.id = `user-entry-${user.user}`;
|
||||
|
||||
//Override color with flair
|
||||
if(user.flair != ""){
|
||||
if(user.flair != "classic"){
|
||||
color = `flair-${user.flair}`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue