mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-29 16:29:19 +02:00
wizard bugfixes
This commit is contained in:
+5
-2
@@ -222,12 +222,15 @@ router.post('/saveData', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
router.get('/getData', (req, res) => {
|
router.get('/getData', (req, res) => {
|
||||||
|
if (configExists() === false) {
|
||||||
|
res.json(serverConfig);
|
||||||
|
}
|
||||||
|
|
||||||
if(req.session.isAdminAuthenticated) {
|
if(req.session.isAdminAuthenticated) {
|
||||||
// Check if the file exists
|
// Check if the file exists
|
||||||
fs.access(configPath, fs.constants.F_OK, (err) => {
|
fs.access(configPath, fs.constants.F_OK, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
// File does not exist
|
console.log(err);
|
||||||
res.status(404).send('Data not found');
|
|
||||||
} else {
|
} else {
|
||||||
// File exists, send it as the response
|
// File exists, send it as the response
|
||||||
res.sendFile(path.join(__dirname, '../' + configName + '.json'));
|
res.sendFile(path.join(__dirname, '../' + configName + '.json'));
|
||||||
|
|||||||
+1
-1
@@ -187,5 +187,5 @@ async function loadConsoleLogs() {
|
|||||||
});
|
});
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
$("#console-output").scrollTop($("#console-output")[0].scrollHeight);
|
$("#console-output").length ? $("#console-output").scrollTop($("#console-output")[0].scrollHeight) : null;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.btn-prev').toggle($('.step:visible').index() !== 0);
|
$('.btn-prev').toggle($('.step:visible').index() !== 0);
|
||||||
$('.btn-next').click(() => navigateStep(true));
|
$('.btn-next').click(() => navigateStep(true));
|
||||||
$('.btn-prev').click(() => navigateStep(false));
|
$('.btn-prev').click(() => navigateStep(false));
|
||||||
});
|
});
|
||||||
|
|
||||||
function updateProgressBar(currentStep) {
|
function updateProgressBar(currentStep) {
|
||||||
|
|||||||
@@ -211,7 +211,6 @@
|
|||||||
<script src="js/settings.js"></script>
|
<script src="js/settings.js"></script>
|
||||||
<script src="js/dropdown.js"></script>
|
<script src="js/dropdown.js"></script>
|
||||||
<script src="js/toast.js"></script>
|
<script src="js/toast.js"></script>
|
||||||
<script src="js/settings.js"></script>
|
|
||||||
<script src="js/setup.js"></script>
|
<script src="js/setup.js"></script>
|
||||||
<script src="js/wizard.js"></script>
|
<script src="js/wizard.js"></script>
|
||||||
<script src="js/confighandler.js"></script>
|
<script src="js/confighandler.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user