You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-27 06:23:53 +01:00
bw switch fix
This commit is contained in:
@@ -55,7 +55,8 @@ router.get('/', (req, res) => {
|
|||||||
tuningLowerLimit: serverConfig.webserver.tuningLowerLimit,
|
tuningLowerLimit: serverConfig.webserver.tuningLowerLimit,
|
||||||
tuningUpperLimit: serverConfig.webserver.tuningUpperLimit,
|
tuningUpperLimit: serverConfig.webserver.tuningUpperLimit,
|
||||||
chatEnabled: serverConfig.webserver.chatEnabled,
|
chatEnabled: serverConfig.webserver.chatEnabled,
|
||||||
device: serverConfig.device
|
device: serverConfig.device,
|
||||||
|
bwSwitch: serverConfig.bwSwitch || false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
26
web/403.ejs
Normal file
26
web/403.ejs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Unauthorized - FM-DX Webserver</title>
|
||||||
|
<link href="css/entry.css" type="text/css" rel="stylesheet">
|
||||||
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" type="text/css" rel="stylesheet">
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||||
|
<link rel="icon" type="image/png" href="favicon2.png" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="wrapper" class="setup-wrapper">
|
||||||
|
<div class="panel-100 no-bg">
|
||||||
|
<img class="top-10" src="./images/openradio_logo_neutral.png" height="64px">
|
||||||
|
<h2 class="text-monospace text-light">[Unauthorized]</h2>
|
||||||
|
|
||||||
|
<div class="panel-100 p-10">
|
||||||
|
<br>
|
||||||
|
<i class="text-big fa-solid fa-exclamation-triangle color-4"></i>
|
||||||
|
<p>You are not authorized to use this tuner. Please try again later or contact the owner.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="js/settings.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
|
|
||||||
<div class="panel-33 hide-phone no-bg">
|
<div class="panel-33 hide-phone no-bg">
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<% if(device === 'other') { %>
|
<% if(device === 'other' || bwSwitch == false) { %>
|
||||||
<span class="panel-100 m-0 h-100" style="height: 48px;width: 100%;">
|
<span class="panel-100 m-0 h-100" style="height: 48px;width: 100%;">
|
||||||
<input type="range" id="volumeSlider" min="0" max="1" step="0.01" value="1" aria-label="Volume slider">
|
<input type="range" id="volumeSlider" min="0" max="1" step="0.01" value="1" aria-label="Volume slider">
|
||||||
</span>
|
</span>
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
<input type="range" id="volumeSlider" min="0" max="1" step="0.01" value="1" aria-label="Volume slider">
|
<input type="range" id="volumeSlider" min="0" max="1" step="0.01" value="1" aria-label="Volume slider">
|
||||||
</span>
|
</span>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (device == 'tef') { %>
|
<% if (device == 'tef' && bwSwitch == true) { %>
|
||||||
<div class="panel-50 w-150 no-bg h-100 m-0 dropdown" id="data-bw" style="margin-left: 25px;">
|
<div class="panel-50 w-150 no-bg h-100 m-0 dropdown" id="data-bw" style="margin-left: 25px;">
|
||||||
<input type="text" placeholder="Auto BW" readonly>
|
<input type="text" placeholder="Auto BW" readonly>
|
||||||
<ul class="options open-top">
|
<ul class="options open-top">
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if (device == 'xdr') { %>
|
<% if (device == 'xdr' && bwSwitch == true) { %>
|
||||||
<div class="panel-50 w-150 no-bg h-100 m-0 dropdown" id="data-bw" style="margin-left: 25px;">
|
<div class="panel-50 w-150 no-bg h-100 m-0 dropdown" id="data-bw" style="margin-left: 25px;">
|
||||||
<input type="text" placeholder="Auto BW" readonly>
|
<input type="text" placeholder="Auto BW" readonly>
|
||||||
<ul class="options open-top">
|
<ul class="options open-top">
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if (device == 'sdr') { %>
|
<% if (device == 'sdr' && bwSwitch == true) { %>
|
||||||
<div class="panel-50 w-150 no-bg h-100 m-0 dropdown" id="data-bw" style="margin-left: 25px;">
|
<div class="panel-50 w-150 no-bg h-100 m-0 dropdown" id="data-bw" style="margin-left: 25px;">
|
||||||
<input type="text" placeholder="Auto BW" readonly>
|
<input type="text" placeholder="Auto BW" readonly>
|
||||||
<ul class="options open-top">
|
<ul class="options open-top">
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ function submitData() {
|
|||||||
const lockToAdmin = $("#tuner-lock").is(":checked");
|
const lockToAdmin = $("#tuner-lock").is(":checked");
|
||||||
const autoShutdown = $("#shutdown-tuner").is(":checked") || false;
|
const autoShutdown = $("#shutdown-tuner").is(":checked") || false;
|
||||||
const antennasEnabled = $("#antenna-switch").is(":checked") || false;
|
const antennasEnabled = $("#antenna-switch").is(":checked") || false;
|
||||||
|
const bwSwitch = $("#toggle-bw").is(":checked") || false;
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
webserver: {
|
webserver: {
|
||||||
@@ -141,6 +142,7 @@ function submitData() {
|
|||||||
autoShutdown,
|
autoShutdown,
|
||||||
enableDefaultFreq,
|
enableDefaultFreq,
|
||||||
defaultFreq,
|
defaultFreq,
|
||||||
|
bwSwitch,
|
||||||
};
|
};
|
||||||
|
|
||||||
if(adminPass.length < 1) {
|
if(adminPass.length < 1) {
|
||||||
@@ -228,6 +230,8 @@ function submitData() {
|
|||||||
$("#device-type").val(selectedDevice.text());
|
$("#device-type").val(selectedDevice.text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#toggle-bw').is(":checked", data.bwSwitch || false);
|
||||||
|
|
||||||
$('#audio-devices').val(data.audio.audioDevice);
|
$('#audio-devices').val(data.audio.audioDevice);
|
||||||
$('#audio-channels').val(data.audio.audioChannels);
|
$('#audio-channels').val(data.audio.audioChannels);
|
||||||
var selectedChannels = $(".option[data-value='" + data.audio.audioChannels + "']");
|
var selectedChannels = $(".option[data-value='" + data.audio.audioChannels + "']");
|
||||||
|
|||||||
Reference in New Issue
Block a user