Sesh titles now glow while unread, fixed chat icon un-lighting pre-emptively.
This commit is contained in:
parent
e85fb18ce5
commit
64348b8486
|
|
@ -166,8 +166,16 @@ textarea{
|
||||||
text-shadow: var(--focus-glow0);
|
text-shadow: var(--focus-glow0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positive-inverse{
|
||||||
|
color: var(--focus0);
|
||||||
|
text-shadow: var(--focus-glow0-alt0);
|
||||||
|
}
|
||||||
|
|
||||||
.positive-low{
|
.positive-low{
|
||||||
color: var(--focus0);
|
color: var(--focus0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.positive-afterglow{
|
||||||
text-shadow: var(--focus-glow0-alt0);
|
text-shadow: var(--focus-glow0-alt0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,14 +106,8 @@ class pmPanel extends panelObj{
|
||||||
//Render out the newest message
|
//Render out the newest message
|
||||||
this.renderMessage(data);
|
this.renderMessage(data);
|
||||||
}else{
|
}else{
|
||||||
//pull current session entry if it exists
|
//Re-render out the sesh list
|
||||||
const curEntry = this.panelDocument.querySelector(`[data-id="${nameObj.name}"]`);
|
this.renderSeshList();
|
||||||
|
|
||||||
//If it doesn't exist
|
|
||||||
if(curEntry == null){
|
|
||||||
//Re-render out the sesh list
|
|
||||||
this.renderSeshList();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -194,6 +188,9 @@ class pmPanel extends panelObj{
|
||||||
if(sesh.id == this.activeSesh){
|
if(sesh.id == this.activeSesh){
|
||||||
//mark it as such
|
//mark it as such
|
||||||
entryDiv.classList.add('positive');
|
entryDiv.classList.add('positive');
|
||||||
|
//If it contains something unread
|
||||||
|
}else if(sesh.unread){
|
||||||
|
entryDiv.classList.add('positive-afterglow');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Create sesh label
|
//Create sesh label
|
||||||
|
|
@ -232,6 +229,9 @@ class pmPanel extends panelObj{
|
||||||
|
|
||||||
//Re-render message buffer
|
//Re-render message buffer
|
||||||
this.renderMessages();
|
this.renderMessages();
|
||||||
|
|
||||||
|
//Re-Render Sesh List
|
||||||
|
this.renderSeshList();
|
||||||
}
|
}
|
||||||
|
|
||||||
renderMessages(){
|
renderMessages(){
|
||||||
|
|
@ -257,7 +257,6 @@ class pmPanel extends panelObj{
|
||||||
*/
|
*/
|
||||||
renderMessage(message){
|
renderMessage(message){
|
||||||
//If we have an empty message
|
//If we have an empty message
|
||||||
console.log(message);
|
|
||||||
if(message.msg == null || message.msg == ''){
|
if(message.msg == null || message.msg == ''){
|
||||||
//BAIL!!
|
//BAIL!!
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ class pmHandler{
|
||||||
|
|
||||||
handlePing(newSesh = false){
|
handlePing(newSesh = false){
|
||||||
//Light up the icon
|
//Light up the icon
|
||||||
this.pmIcon.classList.add('positive-low');
|
this.pmIcon.classList.add('positive-inverse');
|
||||||
|
|
||||||
if(newSesh && (localStorage.getItem('newSeshSound') == 'true')){
|
if(newSesh && (localStorage.getItem('newSeshSound') == 'true')){
|
||||||
utils.ux.playSound(this.openSeshSound);
|
utils.ux.playSound(this.openSeshSound);
|
||||||
|
|
@ -164,14 +164,14 @@ class pmHandler{
|
||||||
//For each sesh
|
//For each sesh
|
||||||
for(const sesh of this.seshList){
|
for(const sesh of this.seshList){
|
||||||
//If a sesh is unread
|
//If a sesh is unread
|
||||||
if(sesh.unread){
|
if(sesh[1].unread){
|
||||||
//LOOK OUT BOYS, THIS ONE'S BEEN READ! CHEESE IT!
|
//LOOK OUT BOYS, THIS ONE'S BEEN READ! CHEESE IT!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Unlight the icon
|
//Unlight the icon
|
||||||
this.pmIcon.classList.remove('positive-low');
|
this.pmIcon.classList.remove('positive-inverse');
|
||||||
}
|
}
|
||||||
|
|
||||||
readSesh(panelID, seshID){
|
readSesh(panelID, seshID){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue