Queue icon now only shows when readSchedule is allowed.
This commit is contained in:
parent
6d16ac2353
commit
57787f81e7
2 changed files with 11 additions and 6 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue