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
bugfixes & plugins WS & UI fixes
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
var currentDate = new Date('Sep 11, 2024 23:50:00');
|
||||
var currentDate = new Date('Sep 12, 2024 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.2.8 [' + formattedDate + ']';
|
||||
var currentVersion = 'v1.2.8.1 [' + formattedDate + ']';
|
||||
|
||||
getInitialSettings();
|
||||
removeUrlParameters(); // Call this function to remove URL parameters
|
||||
|
||||
@@ -827,7 +827,8 @@ const updateDataElements = throttle(function(parsedData) {
|
||||
updateTextIfChanged($('#data-station-itu'), parsedData.txInfo.itu);
|
||||
updateTextIfChanged($('#data-station-pol'), parsedData.txInfo.pol);
|
||||
updateTextIfChanged($('#data-station-distance'), parsedData.txInfo.dist);
|
||||
updateTextIfChanged($('#data-station-azimuth'), parsedData.txInfo.azi);
|
||||
updateHtmlIfChanged($('#data-station-azimuth'), parsedData.txInfo.azi + '°');
|
||||
updateHtmlIfChanged($('#data-regular-pi'), parsedData.txInfo.reg === true ? parsedData.txInfo.pi : ' ');
|
||||
$dataStationContainer.css('display', 'block');
|
||||
} else {
|
||||
$dataStationContainer.removeAttr('style');
|
||||
|
||||
@@ -64,37 +64,8 @@ $(document).ready(function() {
|
||||
$('#tuner-wireless').hide();
|
||||
$('#tuner-usb').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('#login-form').submit(function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Perform an AJAX request to the /login endpoint
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: './login',
|
||||
data: $(this).serialize(),
|
||||
success: function (data) {
|
||||
// Update the content on the page with the message from the response
|
||||
$('#login-message').text(data.message);
|
||||
setTimeout(function () {
|
||||
location.reload(true);
|
||||
}, 1750);
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
// Handle error response
|
||||
if (xhr.status === 403) {
|
||||
// Update the content on the page with the message from the error response
|
||||
$('#login-message').text(xhr.responseJSON.message);
|
||||
} else {
|
||||
// Handle other types of errors if needed
|
||||
console.error('Error:', status, error);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Assuming you have an anchor tag with id 'logout-link'
|
||||
$('.logout-link').click(function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user