mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-30 16:59:15 +02:00
tunnel support, imperial units, admin ui bugfixes
This commit is contained in:
+19
-1
@@ -80,6 +80,10 @@ function submitData() {
|
||||
const fmlistIntegration = $("#fmlist-integration").is(":checked") || false;
|
||||
const fmlistOmid = $('#fmlist-omid').val();
|
||||
|
||||
const tunnelUsername = $('#tunnel-username').val();
|
||||
const tunnelSubdomain = $('#tunnel-subdomain').val();
|
||||
const tunnelToken = $('#tunnel-token').val();
|
||||
|
||||
const publicTuner = $("#tuner-public").is(":checked");
|
||||
const lockToAdmin = $("#tuner-lock").is(":checked");
|
||||
const autoShutdown = $("#shutdown-tuner").is(":checked") || false;
|
||||
@@ -150,6 +154,13 @@ function submitData() {
|
||||
fmlistIntegration,
|
||||
fmlistOmid,
|
||||
},
|
||||
tunnel: {
|
||||
enabled: tunnelEnabled,
|
||||
username: tunnelUsername,
|
||||
token: tunnelToken,
|
||||
lowLatencyMode: tunnelLowLatency,
|
||||
subdomain: tunnelSubdomain,
|
||||
},
|
||||
plugins,
|
||||
device,
|
||||
publicTuner,
|
||||
@@ -315,8 +326,15 @@ function submitData() {
|
||||
}
|
||||
}
|
||||
|
||||
$("#fmlist-integration").prop("checked", data.extras ? data.extras?.fmlistIntegration : "true");
|
||||
$("#fmlist-integration").prop("checked", !!(data.extras && data.extras?.fmlistIntegration));
|
||||
$('#fmlist-omid').val(data.extras?.fmlistOmid);
|
||||
|
||||
$("#tunnel-enable").prop("checked", !!(data.tunnel && data.tunnel?.enabled));
|
||||
$("#tunnel-lowlatency").prop("checked", !!(data.tunnel && data.tunnel?.lowLatencyMode));
|
||||
console.log((data.tunnel && data.tunnel?.enabled) ? data.tunnel?.enabled : "false");
|
||||
$('#tunnel-token').val(data.tunnel?.token);
|
||||
$('#tunnel-subdomain').val(data.tunnel?.subdomain);
|
||||
$('#tunnel-username').val(data.tunnel?.username);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching data:', error.message);
|
||||
|
||||
Reference in New Issue
Block a user