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, design changes
This commit is contained in:
@@ -14,7 +14,7 @@ $(document).ready(function() {
|
||||
const isAdmin = messageData.admin ? '<span style="color: #bada55">[ADMIN]</span>' : '';
|
||||
|
||||
if (messageData.type === 'clientIp') {
|
||||
chatIdentityNickname.html(isAdmin + " " + (savedNickname.length > 0 ? savedNickname : 'Anonymous User'));
|
||||
chatIdentityNickname.html(isAdmin + " " + (savedNickname?.length > 0 ? savedNickname : 'Anonymous User'));
|
||||
chatIdentityNickname.attr('title', messageData.ip);
|
||||
} else {
|
||||
const chatMessage = `
|
||||
|
||||
@@ -25,7 +25,12 @@ const selectOption = (event) => {
|
||||
tuneTo(getCurrentFreq()); //Reset RDS when change antenna input
|
||||
break;
|
||||
case 'data-bw':
|
||||
socket.send("W" + $(event.currentTarget).attr('data-value'));
|
||||
if($(event.currentTarget).attr('data-value') > 500) {
|
||||
socket.send("F" + $(event.currentTarget).attr('data-value'));
|
||||
} else {
|
||||
socket.send("W" + $(event.currentTarget).attr('data-value'));
|
||||
}
|
||||
|
||||
$currentDropdown.find('input').val($(event.currentTarget).text());
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var currentDate = new Date('April 25, 2024 22:00:00');
|
||||
var currentDate = new Date('May 4, 2024 01:00: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.0 [' + formattedDate + ']';
|
||||
var currentVersion = 'v1.2.1 [' + formattedDate + ']';
|
||||
|
||||
getInitialSettings();
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ $(document).ready(function () {
|
||||
|
||||
// Start updating the canvas
|
||||
initCanvas();
|
||||
fillPresets();
|
||||
|
||||
signalToggle.on("change", function () {
|
||||
const signalText = localStorage.getItem('signalUnit');
|
||||
@@ -150,6 +151,10 @@ $(document).ready(function () {
|
||||
toggleButtonState("ims");
|
||||
});
|
||||
|
||||
$("#volumeSlider").on('mouseup', function() {
|
||||
$('#volumeSlider').blur();
|
||||
})
|
||||
|
||||
$(freqUpButton).on("click", tuneUp);
|
||||
$(freqDownButton).on("click", tuneDown);
|
||||
$(psContainer).on("click", copyPs);
|
||||
@@ -421,11 +426,13 @@ function getCurrentFreq() {
|
||||
function checkKey(e) {
|
||||
e = e || window.event;
|
||||
|
||||
if ($('#password:focus').length > 0 || $('#chat-send-message:focus').length > 0) {
|
||||
if ($('#password:focus').length > 0
|
||||
|| $('#chat-send-message:focus').length > 0
|
||||
|| $('#volumeSlider:focus').length > 0
|
||||
|| $('#chat-nickname:focus').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#volumeSlider').blur();
|
||||
getCurrentFreq();
|
||||
|
||||
if (socket.readyState === WebSocket.OPEN) {
|
||||
@@ -893,3 +900,13 @@ function initTooltips() {
|
||||
$('.tooltiptext').css({ top: posY, left: posX });
|
||||
});
|
||||
}
|
||||
|
||||
function fillPresets() {
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
let presetText = localStorage.getItem(`preset${i}`);
|
||||
$(`#preset${i}`).text(presetText);
|
||||
$(`#preset${i}`).click(function() {
|
||||
tuneTo(Number(presetText));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user