From 57787f81e7560c18eca84b0146610d61f5cfa6aa Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Wed, 22 Oct 2025 05:36:55 -0400 Subject: [PATCH] Queue icon now only shows when readSchedule is allowed. --- src/views/partial/channel/chatPanel.ejs | 2 +- www/js/channel/channel.js | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/partial/channel/chatPanel.ejs b/src/views/partial/channel/chatPanel.ejs index e56c28a..0939f30 100644 --- a/src/views/partial/channel/chatPanel.ejs +++ b/src/views/partial/channel/chatPanel.ejs @@ -75,7 +75,7 @@ along with this program. If not, see . %>
- +

diff --git a/www/js/channel/channel.js b/www/js/channel/channel.js index 6220ed0..8bc9a24 100644 --- a/www/js/channel/channel.js +++ b/www/js/channel/channel.js @@ -113,14 +113,13 @@ class channel{ this.socket.on("error", utils.ux.displayResponseError); - this.queueBroadcastSocket.on("queue", (data) => { - console.log(data); - this.queue = new Map(data.queue); - }); - this.socket.on("lock", (data) => { this.queueLock = data.locked; }); + + this.queueBroadcastSocket.on("queue", (data) => { + this.queue = new Map(data.queue); + }); } /** @@ -135,6 +134,12 @@ class channel{ this.user.permMap.site = new Map(data.user.permMap.site); this.user.permMap.chan = new Map(data.user.permMap.chan); + //If we can read the schedule + if(client.user.permMap.chan.get('readSchedule')){ + //Display the queue icon + this.chatBox.adminIcon.style.display = ""; + } + //Tell the chatbox to handle client info //should it have its own event listener instead? Guess it's a stylistic choice :P this.chatBox.handleClientInfo(data);