diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index 0b0a58fe..f34d6bd2 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -492,10 +492,16 @@ function checkStatus(){ if (data["recovery"] === 1) { recovery = true; $("#otadiv").show(); + $('a[href^="#tab-audio"]').hide(); + $('a[href^="#tab-gpio"]').hide(); + $('a[href^="#tab-nvs"]').show(); enableStatusTimer = true; } else { recovery = false; $("#otadiv").hide(); + $('a[href^="#tab-audio"]').show(); + $('a[href^="#tab-gpio"]').show(); + //$('a[href^="#tab-nvs"]').hide(); enableStatusTimer = false; } } @@ -530,25 +536,43 @@ function checkStatus(){ function getConfig() { $.getJSON("/config.json", function(data) { + for (var key in data) { + if (data.hasOwnProperty(key)) { + if (key == 'autoexec') { + if (data["autoexec"] === "1") { + $("#autoexec-cb")[0].checked=true; + } else { + $("#autoexec-cb")[0].checked=false; + } + } else if (key == 'autoexec1') { + $("#autoexec1").val(data["autoexec1"]); + } + + if (recovery) { + $("tbody#nvsTable").append( + "
| Key | +Value | +
|---|