diff --git a/server/endpoints.js b/server/endpoints.js index 3d54050..6d0f7e1 100644 --- a/server/endpoints.js +++ b/server/endpoints.js @@ -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); diff --git a/server/index.js b/server/index.js index 023ac9a..cc44fdb 100644 --- a/server/index.js +++ b/server/index.js @@ -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); diff --git a/server/tx_search.js b/server/tx_search.js index c2acdc9..bd315ca 100644 --- a/server/tx_search.js +++ b/server/tx_search.js @@ -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); }); } diff --git a/web/css/breadcrumbs.css b/web/css/breadcrumbs.css index 701a18d..8045d52 100644 --- a/web/css/breadcrumbs.css +++ b/web/css/breadcrumbs.css @@ -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; } diff --git a/web/css/buttons.css b/web/css/buttons.css index f471812..92ffda6 100644 --- a/web/css/buttons.css +++ b/web/css/buttons.css @@ -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; } diff --git a/web/css/dropdown.css b/web/css/dropdown.css index 6c2f89a..86657cf 100644 --- a/web/css/dropdown.css +++ b/web/css/dropdown.css @@ -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 { diff --git a/web/css/helpers.css b/web/css/helpers.css index 8be4055..049bbbc 100644 --- a/web/css/helpers.css +++ b/web/css/helpers.css @@ -107,7 +107,7 @@ } .hover-brighten { - transition: 0.3s ease-in-out background-color; + transition: 0.3s ease background-color; } .hover-brighten:hover { diff --git a/web/css/main.css b/web/css/main.css index 4ecc064..eb9e425 100644 --- a/web/css/main.css +++ b/web/css/main.css @@ -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%; } diff --git a/web/css/modal.css b/web/css/modal.css index 89b026d..0c4be0c 100644 --- a/web/css/modal.css +++ b/web/css/modal.css @@ -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; } diff --git a/web/css/panels.css b/web/css/panels.css index 8fea02b..e5b4677 100644 --- a/web/css/panels.css +++ b/web/css/panels.css @@ -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; diff --git a/web/css/setup.css b/web/css/setup.css index 34e92e5..4fd140a 100644 --- a/web/css/setup.css +++ b/web/css/setup.css @@ -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; } diff --git a/web/index.ejs b/web/index.ejs index e4faff7..d8af171 100644 --- a/web/index.ejs +++ b/web/index.ejs @@ -146,7 +146,7 @@ -
+
diff --git a/web/js/init.js b/web/js/init.js index ba89cc5..89c2615 100644 --- a/web/js/init.js +++ b/web/js/init.js @@ -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();