1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

ID improvements + console feed + ui changes

This commit is contained in:
NoobishSVK
2024-02-06 22:22:06 +01:00
parent e7f31fbc40
commit 7c4912a12d
10 changed files with 126 additions and 20 deletions

View File

@@ -249,7 +249,8 @@ app.get('/', (req, res) => {
isTuneAuthenticated: req.session.isTuneAuthenticated,
tunerName: serverConfig.identification.tunerName,
tunerDesc: serverConfig.identification.tunerDesc,
tunerLock: serverConfig.lockToAdmin
tunerLock: serverConfig.lockToAdmin,
publicTuner: serverConfig.publicTuner
})
}
});
@@ -259,7 +260,8 @@ app.get('/setup', (req, res) => {
res.render('setup', {
isAdminAuthenticated: req.session.isAdminAuthenticated,
videoDevices: result.audioDevices,
audioDevices: result.videoDevices });
audioDevices: result.videoDevices,
consoleOutput: consoleCmd.logs });
});
});
@@ -362,11 +364,11 @@ wss.on('connection', (ws, request) => {
});
ws.on('message', (message) => {
logDebug('Command received from \x1b[90m' + request.connection.remoteAddress + '\x1b[0m:', message.toString());
logDebug('Command received from \x1b[90m' + clientIp + '\x1b[0m:', message.toString());
command = message.toString();
if(command.startsWith('X')) {
logWarn('Remote tuner shutdown attempted by \x1b[90m' + request.connection.remoteAddress + '\x1b[0m. You may consider blocking this user.');
logWarn('Remote tuner shutdown attempted by \x1b[90m' + clientIp + '\x1b[0m. You may consider blocking this user.');
return;
}