mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 04:57:06 +03:00
fix offline again-release
This commit is contained in:
@@ -465,7 +465,7 @@ window.handleReboot = function (link) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function isConnected(){
|
function isConnected(){
|
||||||
return ConnectedTo.ip && ConnectedTo.ip!='0.0.0.0';
|
return ConnectedTo.hasOwnProperty('ip') && ConnectedTo.ip!='0.0.0.0'&& ConnectedTo.ip!='';
|
||||||
}
|
}
|
||||||
function getIcon(icons){
|
function getIcon(icons){
|
||||||
return isConnected()?icons.icon:icons.label;
|
return isConnected()?icons.icon:icons.label;
|
||||||
@@ -1651,7 +1651,7 @@ function setIcons(offline){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function handleNetworkStatus(data) {
|
function handleNetworkStatus(data) {
|
||||||
setIcons(data.ssid==='');
|
setIcons(!isConnected());
|
||||||
if (hasConnectionChanged(data) || !data.urc) {
|
if (hasConnectionChanged(data) || !data.urc) {
|
||||||
ConnectedTo = data;
|
ConnectedTo = data;
|
||||||
$(".if_eth").hide();
|
$(".if_eth").hide();
|
||||||
@@ -2137,4 +2137,3 @@ function inRange(x, min, max) {
|
|||||||
function sleep(ms) {
|
function sleep(ms) {
|
||||||
return new Promise(resolve => setTimeout(resolve, ms));
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user