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

wizard bugfixes

This commit is contained in:
NoobishSVK
2024-11-07 17:25:04 +01:00
parent 73e7a7bf19
commit 21484dd6a2
4 changed files with 7 additions and 5 deletions

View File

@@ -222,12 +222,15 @@ router.post('/saveData', (req, res) => {
});
router.get('/getData', (req, res) => {
if (configExists() === false) {
res.json(serverConfig);
}
if(req.session.isAdminAuthenticated) {
// Check if the file exists
fs.access(configPath, fs.constants.F_OK, (err) => {
if (err) {
// File does not exist
res.status(404).send('Data not found');
console.log(err);
} else {
// File exists, send it as the response
res.sendFile(path.join(__dirname, '../' + configName + '.json'));

View File

@@ -187,5 +187,5 @@ async function loadConsoleLogs() {
});
resolve();
});
$("#console-output").scrollTop($("#console-output")[0].scrollHeight);
$("#console-output").length ? $("#console-output").scrollTop($("#console-output")[0].scrollHeight) : null;
}

View File

@@ -1,7 +1,7 @@
$(document).ready(function() {
$('.btn-prev').toggle($('.step:visible').index() !== 0);
$('.btn-next').click(() => navigateStep(true));
$('.btn-prev').click(() => navigateStep(false));
$('.btn-prev').click(() => navigateStep(false));
});
function updateProgressBar(currentStep) {

View File

@@ -211,7 +211,6 @@
<script src="js/settings.js"></script>
<script src="js/dropdown.js"></script>
<script src="js/toast.js"></script>
<script src="js/settings.js"></script>
<script src="js/setup.js"></script>
<script src="js/wizard.js"></script>
<script src="js/confighandler.js"></script>