You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
lotta bugfixes
This commit is contained in:
@@ -305,7 +305,7 @@ table .input-text {
|
||||
.hide-phone {
|
||||
display: none;
|
||||
}
|
||||
.m-0 {
|
||||
.m-0, .center-phone {
|
||||
margin: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,10 @@ a:hover {
|
||||
border-bottom: 1px solid var(--color-4);
|
||||
}
|
||||
|
||||
a.hide-underline:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
color: var(--color-4);
|
||||
}
|
||||
|
||||
@@ -345,7 +345,8 @@
|
||||
<hr class="hide-desktop">
|
||||
</div>
|
||||
|
||||
<div class="panel-33 hover-brighten tooltip" data-tooltip="This panel contains the current TX info when RDS is loaded.<br><strong>Clicking on this panel copies the info into the clipboard.</strong>">
|
||||
<div class="panel-33 hover-brighten tooltip" style="min-height: 91px;"
|
||||
data-tooltip="This panel contains the current TX info when RDS is loaded.<br><strong>Clicking on this panel copies the info into the clipboard.</strong>">
|
||||
<div id="data-station-container">
|
||||
<h2 style="margin-top: 0;" class="mb-0">
|
||||
<span id="data-station-name"></span>
|
||||
@@ -362,7 +363,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel-10 no-bg" style="margin-left: 0; margin-top: 0; margin-right: 0;display:flex;">
|
||||
<div class="panel-10 no-bg center-phone" style="margin-left: 0; margin-top: 0; margin-right: 0;display:flex;">
|
||||
<div class="panel-100" style="margin-left: 0;">
|
||||
<h2 class="bottom-10">AF</h2>
|
||||
<div id="af-list" style="text-align: center;">
|
||||
|
||||
@@ -34,14 +34,20 @@ function OnConnectivityCallback(isConnected) {
|
||||
}
|
||||
}
|
||||
|
||||
function isIOS() {
|
||||
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||
}
|
||||
|
||||
function OnPlayButtonClick(_ev) {
|
||||
const $playbutton = $('.playbutton');
|
||||
const isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||
|
||||
if (Stream) {
|
||||
console.log("Stopping stream...");
|
||||
shouldReconnect = false;
|
||||
destroyStream();
|
||||
$playbutton.find('.fa-solid').toggleClass('fa-stop fa-play');
|
||||
if ('audioSession' in navigator) {
|
||||
if (isiOS && 'audioSession' in navigator) {
|
||||
navigator.audioSession.type = "none";
|
||||
}
|
||||
} else {
|
||||
@@ -50,10 +56,11 @@ function OnPlayButtonClick(_ev) {
|
||||
createStream();
|
||||
Stream.Start();
|
||||
$playbutton.find('.fa-solid').toggleClass('fa-play fa-stop');
|
||||
if ('audioSession' in navigator) {
|
||||
navigator.audioSession.type = "playback"; // Android background play fix
|
||||
if (isiOS && 'audioSession' in navigator) {
|
||||
navigator.audioSession.type = "playback";
|
||||
}
|
||||
}
|
||||
|
||||
$playbutton.addClass('bg-gray').prop('disabled', true);
|
||||
setTimeout(() => {
|
||||
$playbutton.removeClass('bg-gray').prop('disabled', false);
|
||||
|
||||
@@ -40,6 +40,7 @@ function tuneDown() {
|
||||
}
|
||||
|
||||
function tuneTo(freq) {
|
||||
previousFreq = getCurrentFreq();
|
||||
socket.send("T" + ((freq).toFixed(1) * 1000));
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,8 @@ function populateFields(data, prefix = "") {
|
||||
$element.val(value);
|
||||
}
|
||||
});
|
||||
|
||||
updateIconState();
|
||||
}
|
||||
|
||||
function updateConfigData(data, prefix = "") {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var currentDate = new Date('Feb 23, 2025 15:30:00');
|
||||
var currentDate = new Date('Apr 19, 2025 21:30:00');
|
||||
var day = currentDate.getDate();
|
||||
var month = currentDate.getMonth() + 1; // Months are zero-indexed, so add 1
|
||||
var year = currentDate.getFullYear();
|
||||
var formattedDate = day + '/' + month + '/' + year;
|
||||
var currentVersion = 'v1.3.6 [' + formattedDate + ']';
|
||||
var currentVersion = 'v1.3.6.1 [' + formattedDate + ']';
|
||||
|
||||
getInitialSettings();
|
||||
removeUrlParameters();
|
||||
|
||||
@@ -722,7 +722,6 @@ function checkKey(e) {
|
||||
// Handle default case if needed
|
||||
break;
|
||||
}
|
||||
previousFreq = currentFreq;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1190,13 +1189,25 @@ function initTooltips(target = null) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function fillPresets() {
|
||||
let hasAnyPreset = false;
|
||||
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
let presetText = localStorage.getItem(`preset${i}`);
|
||||
$(`#preset${i}-text`).text(presetText);
|
||||
$(`#preset${i}`).click(function() {
|
||||
tuneTo(Number(presetText));
|
||||
});
|
||||
|
||||
if (presetText != "null") {
|
||||
hasAnyPreset = true;
|
||||
$(`#preset${i}-text`).text(presetText);
|
||||
$(`#preset${i}`).click(function() {
|
||||
tuneTo(Number(presetText));
|
||||
});
|
||||
} else {
|
||||
$(`#preset${i}`).hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasAnyPreset) {
|
||||
$('#preset1').parent().hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,12 +166,10 @@ $(document).ready(() => {
|
||||
$('.version-string').text(currentVersion);
|
||||
|
||||
setBg();
|
||||
|
||||
updateIconState();
|
||||
|
||||
// Update icons when the checkbox state changes
|
||||
$('input[type="checkbox"]').change(function() {
|
||||
updateIconState();
|
||||
updateIconState(this);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -180,15 +178,27 @@ function getQueryParameter(name) {
|
||||
return urlParams.get(name);
|
||||
}
|
||||
|
||||
function updateIconState() {
|
||||
$('input[type="checkbox"]').each(function() {
|
||||
var icon = $(this).siblings('label').find('i');
|
||||
if ($(this).is(':checked')) {
|
||||
function updateIconState(el) {
|
||||
// If an element is passed, update only that one
|
||||
if (el) {
|
||||
var $checkbox = $(el);
|
||||
var icon = $checkbox.siblings('label').find('i');
|
||||
if ($checkbox.is(':checked')) {
|
||||
icon.removeClass('fa-toggle-off').addClass('fa-toggle-on');
|
||||
} else {
|
||||
icon.removeClass('fa-toggle-on').addClass('fa-toggle-off');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Otherwise, update all checkboxes
|
||||
$('input[type="checkbox"]').each(function() {
|
||||
var icon = $(this).siblings('label').find('i');
|
||||
if ($(this).is(':checked')) {
|
||||
icon.removeClass('fa-toggle-off').addClass('fa-toggle-on');
|
||||
} else {
|
||||
icon.removeClass('fa-toggle-on').addClass('fa-toggle-off');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function setTheme(themeName) {
|
||||
|
||||
@@ -85,8 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container">
|
||||
<div class="panel-50 p-bottom-20" style="overflow-x: auto;">
|
||||
<div class="panel-100-real p-bottom-20" style="overflow-x: auto;">
|
||||
<h3>Current users</h3>
|
||||
<table class="table-big">
|
||||
<thead>
|
||||
@@ -120,7 +119,7 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="panel-50 p-bottom-20">
|
||||
<div class="panel-100-real p-bottom-20">
|
||||
<h3>Quick settings</h3>
|
||||
<div class="flex-container flex-center" style="margin: 30px;">
|
||||
<%- include('_components', {component: 'checkbox', cssClass: '', label: 'Public Tuner', id: 'publicTuner'}) %>
|
||||
@@ -130,7 +129,6 @@
|
||||
<%- include('_components', {component: 'text', cssClass: 'w-150 br-15', placeholder: '', label: 'Tune password', id: 'password-tunePass', password: true}) %>
|
||||
<%- include('_components', {component: 'text', cssClass: 'w-150 br-15', placeholder: '', label: 'Admin password', id: 'password-adminPass', password: true}) %><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container">
|
||||
<div class="panel-100-real p-bottom-20 bottom-20">
|
||||
@@ -208,8 +206,13 @@
|
||||
</div>
|
||||
|
||||
<div class="flex-container">
|
||||
<div class="panel-100-real p-bottom-20">
|
||||
<h3>Miscellaneous</h3>
|
||||
<div class="panel-50 p-bottom-20">
|
||||
<h3>Volume</h3>
|
||||
<p>This option will boost the audio volume globally, recommended for the Headless TEF.</p>
|
||||
<%- include('_components', {component: 'checkbox', cssClass: '', label: 'Audio Boost', id: 'audio-audioBoost'}) %>
|
||||
</div>
|
||||
<div class="panel-50 p-bottom-20">
|
||||
<h3>Experimental</h3>
|
||||
<p>If you use an USB audio card on Linux, enabling this option might fix your audio issues.</p>
|
||||
<%- include('_components', {component: 'checkbox', cssClass: '', label: 'ALSA Software mode', id: 'audio-softwareMode'}) %>
|
||||
</div>
|
||||
@@ -524,7 +527,7 @@
|
||||
</div>
|
||||
<div class="panel-100 p-bottom-20">
|
||||
<h3>Tunnel</h3>
|
||||
<p>When you become a <a href="https://buymeacoffee.com/fmdx" target="_blank"><strong>FMDX.org supporter</strong></a>, you can host your webserver without the need of a public IP address.<br>
|
||||
<p>When you become an <a href="https://buymeacoffee.com/fmdx" target="_blank"><strong>FMDX.org supporter</strong></a>, you can host your webserver without the need of a public IP address & port forwarding.<br>
|
||||
When you become a supporter, you can message the Founders on Discord for your login details.</p>
|
||||
|
||||
<%- include('_components', {component: 'checkbox', cssClass: 'm-right-10', label: 'Enable tunnel', id: 'tunnel-enabled'}) %><br>
|
||||
|
||||
Reference in New Issue
Block a user