diff --git a/server/endpoints.js b/server/endpoints.js
index 95602e0..e90bbc1 100644
--- a/server/endpoints.js
+++ b/server/endpoints.js
@@ -55,7 +55,8 @@ router.get('/', (req, res) => {
tuningLowerLimit: serverConfig.webserver.tuningLowerLimit,
tuningUpperLimit: serverConfig.webserver.tuningUpperLimit,
chatEnabled: serverConfig.webserver.chatEnabled,
- device: serverConfig.device
+ device: serverConfig.device,
+ bwSwitch: serverConfig.bwSwitch || false
});
}
});
diff --git a/web/403.ejs b/web/403.ejs
new file mode 100644
index 0000000..af2c259
--- /dev/null
+++ b/web/403.ejs
@@ -0,0 +1,26 @@
+
+
+
+ Unauthorized - FM-DX Webserver
+
+
+
+
+
+
+
+
+
+

+
[Unauthorized]
+
+
+
+
+
You are not authorized to use this tuner. Please try again later or contact the owner.
+
+
+
+
+
+
diff --git a/web/index.ejs b/web/index.ejs
index 725c8b6..22ab61f 100644
--- a/web/index.ejs
+++ b/web/index.ejs
@@ -164,7 +164,7 @@
- <% if(device === 'other') { %>
+ <% if(device === 'other' || bwSwitch == false) { %>
@@ -173,7 +173,7 @@
<% } %>
- <% if (device == 'tef') { %>
+ <% if (device == 'tef' && bwSwitch == true) { %>
<% } %>
- <% if (device == 'xdr') { %>
+ <% if (device == 'xdr' && bwSwitch == true) { %>
<% } %>
- <% if (device == 'sdr') { %>
+ <% if (device == 'sdr' && bwSwitch == true) { %>
diff --git a/web/js/confighandler.js b/web/js/confighandler.js
index 53fa957..73db168 100644
--- a/web/js/confighandler.js
+++ b/web/js/confighandler.js
@@ -75,6 +75,7 @@ function submitData() {
const lockToAdmin = $("#tuner-lock").is(":checked");
const autoShutdown = $("#shutdown-tuner").is(":checked") || false;
const antennasEnabled = $("#antenna-switch").is(":checked") || false;
+ const bwSwitch = $("#toggle-bw").is(":checked") || false;
const data = {
webserver: {
@@ -141,6 +142,7 @@ function submitData() {
autoShutdown,
enableDefaultFreq,
defaultFreq,
+ bwSwitch,
};
if(adminPass.length < 1) {
@@ -228,6 +230,8 @@ function submitData() {
$("#device-type").val(selectedDevice.text());
}
+ $('#toggle-bw').is(":checked", data.bwSwitch || false);
+
$('#audio-devices').val(data.audio.audioDevice);
$('#audio-channels').val(data.audio.audioChannels);
var selectedChannels = $(".option[data-value='" + data.audio.audioChannels + "']");