mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
recovery mode detection
This commit is contained in:
@@ -11,7 +11,7 @@ if (!String.prototype.format) {
|
||||
};
|
||||
}
|
||||
|
||||
var recovery = 0;
|
||||
var recovery = false;
|
||||
var enableTimers = true;
|
||||
var commandHeader = 'squeezelite -b 500:2000 -d all=info ';
|
||||
|
||||
@@ -187,16 +187,6 @@ $(document).ready(function(){
|
||||
selectOutput(this);
|
||||
});
|
||||
|
||||
if (recovery) {
|
||||
$("#recoverydiv").hide();
|
||||
$("#otadiv").show();
|
||||
$("#command_line").hide();
|
||||
$("#wifi").hide();
|
||||
} else {
|
||||
$("#recoverydiv").show();
|
||||
$("#otadiv").hide();
|
||||
}
|
||||
|
||||
//first time the page loads: attempt to get the connection status and start the wifi scan
|
||||
refreshAP();
|
||||
getConfig();
|
||||
@@ -379,6 +369,19 @@ function getConfig() {
|
||||
$("#autoexec-cb")[0].checked=false;
|
||||
$("#autoexec-command").hide(200);
|
||||
}
|
||||
}
|
||||
if (data.hasOwnProperty('recovery')) {
|
||||
if (data["recovery"] === 1) {
|
||||
recovery = true;
|
||||
$("#recoverydiv").hide();
|
||||
$("#otadiv").show();
|
||||
$("#command_line").hide();
|
||||
$("#wifi").hide();
|
||||
} else {
|
||||
recovery = false;
|
||||
$("#recoverydiv").show();
|
||||
$("#otadiv").hide();
|
||||
}
|
||||
}
|
||||
if (data.hasOwnProperty('list')) {
|
||||
data.list.forEach(function(line) {
|
||||
|
||||
Reference in New Issue
Block a user