Queue icon now only shows when readSchedule is allowed.
This commit is contained in:
parent
6d16ac2353
commit
57787f81e7
|
|
@ -75,7 +75,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. %>
|
|||
<div class="chat-panel control-prompt" id="chat-panel-control-div">
|
||||
<i class="chat-panel chat-panel-control control-prompt bi-gear-fill" id="chat-panel-settings-icon"></i>
|
||||
<i class="chat-panel chat-panel-control control-prompt bi-chat-left-quote-fill" id="chat-panel-pm-icon"></i>
|
||||
<i class="chat-panel chat-panel-control control-prompt bi-magic" id="chat-panel-admin-icon"></i>
|
||||
<i class="chat-panel chat-panel-control control-prompt bi-magic" id="chat-panel-admin-icon" style="display:none;"></i>
|
||||
<i class="chat-panel chat-panel-control control-prompt bi-images" id="chat-panel-emote-icon"></i>
|
||||
<span id="chat-panel-prompt-span">
|
||||
<p id="chat-panel-prompt-autocomplete" class="chat-panel"><span id="chat-panel-prompt-autocomplete-filler"></span><span id="chat-panel-prompt-autocomplete-display"></span></p>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue