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
bugfixes
This commit is contained in:
@@ -412,5 +412,5 @@ function showOnlineUsers(currentUsers) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
handleData, showOnlineUsers, dataToSend, initialData
|
||||
handleData, showOnlineUsers, dataToSend, initialData, resetToDefault
|
||||
};
|
||||
|
||||
7
index.js
7
index.js
@@ -533,10 +533,14 @@ wss.on('connection', (ws, request) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if(command.includes('\'')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(command.startsWith('T')) {
|
||||
let tuneFreq = Number(command.slice(1)) / 1000;
|
||||
|
||||
if(serverConfig.webserver.tuningLimit === true && (tuneFreq < serverConfig.webserver.tuningLowerLimit || tuneFreq > serverConfig.webserver.tuningUpperLimit)) {
|
||||
if(serverConfig.webserver.tuningLimit === true && (tuneFreq < serverConfig.webserver.tuningLowerLimit || tuneFreq > serverConfig.webserver.tuningUpperLimit) || isNaN(tuneFreq)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -569,6 +573,7 @@ wss.on('connection', (ws, request) => {
|
||||
setTimeout(function() {
|
||||
if(currentUsers === 0) {
|
||||
client.write('T' + Math.round(serverConfig.defaultFreq * 1000) +'\n');
|
||||
dataHandler.resetToDefault();
|
||||
dataHandler.dataToSend.freq = Number(serverConfig.defaultFreq).toFixed(3);
|
||||
}
|
||||
}, 10000)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
<div class="panel-33 flex-container flex-phone" id="tune-buttons">
|
||||
<button id="freq-down" aria-label="Tune down by 100 KHz"><i class="fa-solid fa-chevron-left"></i></button>
|
||||
<input type="text" id="commandinput" inputmode="numeric" placeholder="Frequency" aria-label="Current frequency: ">
|
||||
<input type="text" id="commandinput" inputmode="numeric" placeholder="Frequency" autocomplete="off" aria-label="Current frequency: ">
|
||||
<button id="freq-up" aria-label="Tune up by 100 KHz"><i class="fa-solid fa-chevron-right"></i></button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,7 +27,9 @@ $(document).ready(function() {
|
||||
messages.append(chatMessage);
|
||||
|
||||
if($('#chat-chatbox').is(':visible')) {
|
||||
setTimeout(function() {
|
||||
$('#chat-chatbox').scrollTop($('#chat-chatbox')[0].scrollHeight);
|
||||
}, 100)
|
||||
} else {
|
||||
if(messageData.history !== true) {
|
||||
chatMessageCount++;
|
||||
@@ -50,11 +52,14 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$('.chatbutton').click(function() {
|
||||
$('#chat-chatbox').scrollTop($('#chat-chatbox')[0].scrollHeight);
|
||||
chatMessageCount = 0;
|
||||
$('.chat-messages-count').text(chatMessageCount);
|
||||
$('.chatbutton').removeClass('bg-color-4').addClass('bg-color-2');
|
||||
$('#chat-send-message').focus();
|
||||
|
||||
setTimeout(function() {
|
||||
$('#chat-chatbox').scrollTop($('#chat-chatbox')[0].scrollHeight);
|
||||
}, 100)
|
||||
});
|
||||
|
||||
$('#chat-nickname').keypress(function(event) {
|
||||
|
||||
@@ -366,6 +366,7 @@ function checkKey(e) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#volumeSlider').blur();
|
||||
getCurrentFreq();
|
||||
|
||||
if (socket.readyState === WebSocket.OPEN) {
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
var currentVersion = 'v1.1.2 [3.3.2024]';
|
||||
var currentDate = new Date('March 4, 2024 22: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.1.2a [' + formattedDate + ']';
|
||||
|
||||
|
||||
/**
|
||||
* Themes
|
||||
|
||||
Reference in New Issue
Block a user