You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 14:11:59 +01:00
bugfixes
This commit is contained in:
@@ -123,6 +123,10 @@ router.get('/setup', (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
router.get('/rds', (req, res) => {
|
||||
res.send('Please connect using a WebSocket compatible app to obtain RDS stream.');
|
||||
});
|
||||
|
||||
router.get('/api', (req, res) => {
|
||||
const { ps_errors, rt0_errors, rt1_errors, ims, eq, ant, st_forced, previousFreq, txInfo, ...dataToSend } = dataHandler.dataToSend;
|
||||
res.json(dataToSend);
|
||||
|
||||
@@ -34,7 +34,7 @@ console.log(`\x1b[32m
|
||||
| _| | | | |_____| |_| / \\ \\ V V / __/ |_) \\__ \\ __/ | \\ V / __/ |
|
||||
|_| |_| |_| |____/_/\\_\\ \\_/\\_/ \\___|_.__/|___/\\___|_| \\_/ \\___|_|
|
||||
`);
|
||||
console.log('\x1b[0mFM-DX-Webserver', pjson.version);
|
||||
console.log('\x1b[0mFM-DX Webserver', pjson.version);
|
||||
console.log('\x1b[90m―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――');
|
||||
|
||||
// Start ffmpeg
|
||||
@@ -285,6 +285,8 @@ wss.on('connection', (ws, request) => {
|
||||
logInfo(`Web client \x1b[32mconnected\x1b[0m (${clientIp}) \x1b[90m[${currentUsers}]\x1b[0m`);
|
||||
}
|
||||
});
|
||||
}).on('error', (err) => {
|
||||
logInfo(`Web client \x1b[32mconnected\x1b[0m (${clientIp}) \x1b[90m[${currentUsers}]\x1b[0m`);
|
||||
});
|
||||
|
||||
ws.on('message', (message) => {
|
||||
@@ -463,7 +465,7 @@ httpServer.on('upgrade', (request, socket, head) => {
|
||||
chatWss.emit('connection', ws, request);
|
||||
});
|
||||
});
|
||||
} else if (request.url === '/rds') {
|
||||
} else if (request.url === '/rds' || request.url === '/rdsspy') {
|
||||
sessionMiddleware(request, {}, () => {
|
||||
rdsWss.handleUpgrade(request, socket, head, (ws) => {
|
||||
rdsWss.emit('connection', ws, request);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const fetch = require('node-fetch');
|
||||
const { serverConfig } = require('./server_config')
|
||||
const { serverConfig } = require('./server_config');
|
||||
const consoleCmd = require('./console');
|
||||
|
||||
let cachedData = {};
|
||||
|
||||
@@ -39,7 +40,6 @@ function fetchTx(freq, piCode, rdsPs) {
|
||||
return processData(data, piCode, rdsPs);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Error fetching data:", error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ h4 {
|
||||
padding: 5px 25px;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
p#tuner-desc {
|
||||
@@ -126,7 +126,7 @@ label {
|
||||
line-height: 64px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
transition: 500ms ease-in-out background;
|
||||
transition: 500ms ease background;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ label {
|
||||
line-height: 64px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
transition: 500ms ease-in-out background;
|
||||
transition: 500ms ease background;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ label {
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
border-radius: 10px;
|
||||
transition: 0.3s ease-in-out background-color;
|
||||
transition: 0.3s ease background-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -331,6 +331,10 @@ pre {
|
||||
margin: auto !important;
|
||||
width: 100%;
|
||||
}
|
||||
h1#tuner-name {
|
||||
max-width: 90%;
|
||||
margin: auto;
|
||||
}
|
||||
h2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ button, input[type="submit"] {
|
||||
height: 100%;
|
||||
border: 0;
|
||||
border-radius: 15px;
|
||||
transition: 0.3s ease-in-out background-color;
|
||||
transition: 0.3s ease background-color;
|
||||
background-color: var(--color-4);
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
@@ -90,54 +90,39 @@ input[type="text"], textarea, input[type="password"] {
|
||||
border: 2px solid transparent;
|
||||
outline: 0;
|
||||
color: var(--color-text);
|
||||
background-color: transparent;
|
||||
background-color: var(--color-1-transparent);
|
||||
font-family: 'Titillium Web', sans-serif;
|
||||
}
|
||||
|
||||
#tune-buttons input[type="text"]:not(.no-bg):not(.no-filter)::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--color-1);
|
||||
opacity: 0.6; /* Set the desired opacity */
|
||||
pointer-events: none; /* Ensure it does not interfere with interactions */
|
||||
z-index: -1; /* Place the pseudo-element behind the panel content */
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
#tune-buttons input[type="text"]:not(.no-bg):not(.no-filter) {
|
||||
backdrop-filter: blur(5px);
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
|
||||
#tune-buttons button {
|
||||
box-sizing: border-box;
|
||||
background-color: var(--color-4);
|
||||
border: 0;
|
||||
color: var(--color-1);
|
||||
width: 25%;
|
||||
height: 48px;
|
||||
display: block;
|
||||
padding: 14px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease-in-out;
|
||||
}
|
||||
#tune-buttons button {
|
||||
box-sizing: border-box;
|
||||
background-color: var(--color-4);
|
||||
border: 0;
|
||||
color: var(--color-1);
|
||||
width: 25%;
|
||||
height: 48px;
|
||||
display: block;
|
||||
padding: 14px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
#tune-buttons button:hover {
|
||||
#tune-buttons button:hover {
|
||||
background-color: var(--color-main-bright);
|
||||
}
|
||||
}
|
||||
|
||||
#freq-down {
|
||||
#freq-down {
|
||||
border-radius: 15px 0 0 15px;
|
||||
}
|
||||
}
|
||||
|
||||
#freq-up {
|
||||
#freq-up {
|
||||
border-radius: 0 15px 15px 0;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="range"] {
|
||||
margin: 0;
|
||||
@@ -326,7 +311,7 @@ select {
|
||||
border: 0;
|
||||
border-bottom: 4px solid var(--color-2);
|
||||
cursor: pointer;
|
||||
transition: 0.35s ease-in-out background;
|
||||
transition: 0.35s ease background;
|
||||
font-family: inherit;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
background-color: var(--color-4);
|
||||
color: var(--color-main);
|
||||
border-radius: 15px;
|
||||
transition: 0.35s ease-in-out background-color;
|
||||
transition: 0.35s ease background-color;
|
||||
}
|
||||
|
||||
.dropdown input:hover {
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
}
|
||||
|
||||
.hover-brighten {
|
||||
transition: 0.3s ease-in-out background-color;
|
||||
transition: 0.3s ease background-color;
|
||||
}
|
||||
|
||||
.hover-brighten:hover {
|
||||
|
||||
@@ -55,7 +55,7 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
transition: 0.3s ease-in-out background-color;
|
||||
transition: 0.3s ease background-color;
|
||||
margin: 0 auto;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out; /* Fade-in/out transition */
|
||||
transition: opacity 0.3s ease; /* Fade-in/out transition */
|
||||
z-index: 20; /* Ensure the modal is above other content */
|
||||
color: var(--color-4);
|
||||
backdrop-filter: blur(10px);
|
||||
@@ -24,7 +24,7 @@
|
||||
padding: 30px;
|
||||
border-radius: 15px;
|
||||
opacity: 1;
|
||||
transition: opacity 0.3s ease-in-out; /* Fade-in/out transition */
|
||||
transition: opacity 0.3s ease; /* Fade-in/out transition */
|
||||
z-index: 21; /* Ensure the modal content is above the modal background */
|
||||
min-width: 500px;
|
||||
}
|
||||
@@ -43,7 +43,7 @@
|
||||
top: 17px;
|
||||
right: 30px;
|
||||
cursor: pointer;
|
||||
transition: 0.3s ease-in-out color;
|
||||
transition: 0.3s ease color;
|
||||
}
|
||||
|
||||
.close:hover {
|
||||
@@ -60,7 +60,7 @@
|
||||
background: var(--color-4);
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
transition: 0.35s ease-in-out background;
|
||||
transition: 0.35s ease background;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
transition: 0.3s ease-in-out background-color;
|
||||
transition: 0.3s ease background-color;
|
||||
}
|
||||
|
||||
*[class^="panel-"]:not(.no-bg):not(.no-filter):not(.w-100) {
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
@@ -71,8 +70,9 @@
|
||||
margin-bottom: 20px;
|
||||
background-color: transparent;
|
||||
}
|
||||
*[class^="panel-"]:not(.no-bg):not(.no-filter) {
|
||||
backdrop-filter:blur(0px);
|
||||
*[class^="panel-"]:not(.no-bg):not(.no-filter):not(#ps-container),
|
||||
.panel-100.w-100::before {
|
||||
backdrop-filter: blur(0px);
|
||||
}
|
||||
.flex-phone {
|
||||
display: flex;
|
||||
|
||||
@@ -37,7 +37,7 @@ ul.nav li {
|
||||
display: inline;
|
||||
padding: 15px;
|
||||
cursor: pointer;
|
||||
transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
|
||||
transition: color 0.3s ease, background-color 0.3s ease;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-33 flex-container flex-phone" id="tune-buttons">
|
||||
<div class="panel-33 flex-container flex-phone no-bg" id="tune-buttons">
|
||||
<button id="freq-down" aria-label="Tune down"><i class="fa-solid fa-chevron-left"></i></button>
|
||||
<input type="text" id="commandinput" inputmode="numeric" placeholder="Frequency" autocomplete="off" aria-label="Current frequency: ">
|
||||
<button id="freq-up" aria-label="Tune up"><i class="fa-solid fa-chevron-right"></i></button>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var currentDate = new Date('Jul 31, 2024 17:00:00');
|
||||
var currentDate = new Date('Aug 1, 2024 20: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.6 [' + formattedDate + ']';
|
||||
var currentVersion = 'v1.2.6a [' + formattedDate + ']';
|
||||
|
||||
getInitialSettings();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user