diff --git a/src/views/partial/navbar.ejs b/src/views/partial/navbar.ejs
index cd58614..db80667 100644
--- a/src/views/partial/navbar.ejs
+++ b/src/views/partial/navbar.ejs
@@ -17,27 +17,34 @@ along with this program. If not, see . %>
<%#%><%#= instance %><%#
+
<% } %>
\ No newline at end of file
diff --git a/www/css/theme/the-network-classic.css b/www/css/theme/the-network-classic.css
index 1ccbee5..ae6e229 100644
--- a/www/css/theme/the-network-classic.css
+++ b/www/css/theme/the-network-classic.css
@@ -336,6 +336,14 @@ input.control-prompt, input.control-prompt:focus{
padding-right: 0.5em;
}
+.navbar-item.first{
+ margin-left: 0.25em;
+}
+
+.navbar-item-seperator.first{
+ display: none;
+}
+
/* index */
.channel-guide-entry{
background-color: var(--bg1);
diff --git a/www/js/channel/channel.js b/www/js/channel/channel.js
index 0782a38..f519cbe 100644
--- a/www/js/channel/channel.js
+++ b/www/js/channel/channel.js
@@ -145,11 +145,19 @@ class channel{
this.user.permMap.chan = new Map(data.user.permMap.chan);
//If we can read the schedule
- if(client.user.permMap.chan.get('readSchedule')){
+ if(this.user.permMap.chan.get('readSchedule')){
//Display the queue icon
this.chatBox.adminIcon.style.display = "";
}
+ //If we can manage the channel
+ if(this.user.permMap.chan.get('manageChannel')){
+ //Unhide the channel settings button
+ document.querySelector('.navbar-item#channel-settings-button-span').style.display = "";
+ //Annoyingly, there isn't a good way in html to set a links relative filepath to use the current 'file' as a directory
+ document.querySelector('.navbar-item#channel-settings-button-span a').href = `${document.URL}/settings`;
+ }
+
//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);
@@ -218,6 +226,17 @@ class channel{
return results;
}
+ insertSettingsIcon(){
+ const settingsIcon = document.createElement('i');
+ settingsIcon.classList.add('navbar-item', 'bi-projector-fill');
+ settingsIcon.id = "channel-settings-button";
+
+ //Insert settings icon into navbar
+ document.querySelector('.navbar-item#logout-button').insertAdjacentElement('beforebegin', settingsIcon);
+ //Insert icon seperator
+ settingsIcon.insertAdjacentText('afterend', ' - ');
+ }
+
/**
* Processes and applies default config on any unset settings
* @param {Boolean} force - Whether or not to forcefully reset already set settings