diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index af0f94f9..68c90e60 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -528,8 +528,10 @@ function checkStatus(){ $('a[href^="#tab-audio"]').hide(); $('a[href^="#tab-gpio"]').hide(); $('a[href^="#tab-nvs"]').show(); - $( "footer.footer" ).removeClass('sl'); - $( "footer.footer" ).addClass('recovery'); + $("footer.footer").removeClass('sl'); + $("footer.footer").addClass('recovery'); + $("#boot-button").html('Reboot'); + $("#boot-form").attr('action', '/reboot.json'); enableStatusTimer = true; } else { recovery = false; @@ -537,8 +539,10 @@ function checkStatus(){ $('a[href^="#tab-audio"]').show(); $('a[href^="#tab-gpio"]').show(); $('a[href^="#tab-nvs"]').hide(); - $( "footer.footer" ).removeClass('recovery'); - $( "footer.footer" ).addClass('sl'); + $("footer.footer").removeClass('recovery'); + $("footer.footer").addClass('sl'); + $("#boot-button").html('Recovery'); + $("#boot-form").attr('action', '/recovery.json'); enableStatusTimer = false; } } @@ -567,7 +571,7 @@ function checkStatus(){ blockAjax = false; }) .fail(function() { - //don't do anything, the server might be down while esp32 recalibrates radio + blockAjax = false; }); } @@ -585,32 +589,28 @@ function getConfig() { $("input#autoexec1").val(data["autoexec1"]); } - if (recovery) { - $("tbody#nvsTable").append( - ""+ - ""+key+""+ - ""+ - ""+ - ""+ - "" - ); - $("input#"+key).val(data[key]); - console.log("#"+key, data[key]); - } + $("tbody#nvsTable").append( + ""+ + ""+key+""+ + ""+ + ""+ + ""+ + "" + ); + $("input#"+key).val(data[key]); + console.log(key+": "+data[key]); //TODO } } - if (recovery) { - $("tbody#nvsTable").append( - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - "" - ); - } + $("tbody#nvsTable").append( + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + "" + ); }) .fail(function() { console.log("failed to fetch config!"); diff --git a/components/wifi-manager/index.html b/components/wifi-manager/index.html index 9673f83f..c75e324f 100644 --- a/components/wifi-manager/index.html +++ b/components/wifi-manager/index.html @@ -260,6 +260,11 @@
+
+
+ +
+

Check for firmware upgrade

@@ -294,7 +299,7 @@
-

squeezelite-esp32, © 2019, philippe44, sle118, daduke
Licender under ???

+

squeezelite-esp32, © 2019, philippe44, sle118, daduke
Licensed under the GPL

This app would not be possible without the following libraries:

@@ -309,5 +314,6 @@
+ diff --git a/components/wifi-manager/style.css b/components/wifi-manager/style.css index 9dd9eb38..aa7a8cab 100644 --- a/components/wifi-manager/style.css +++ b/components/wifi-manager/style.css @@ -327,3 +327,7 @@ span#flash-status { td.value { width: 80%; } + +#boot-div { + float: right; +}