fixed web panel internet connection status bug

This commit is contained in:
Justin 2023-06-30 19:57:12 +08:00 committed by GitHub
parent 0e4e798dcf
commit f6d1c18ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8629,13 +8629,11 @@
try {
const online = await fetch("https://ssl.gstatic.com/");
const online = await fetch("http://api.openweathermap.org/data");
console.log(online.status);
if (online.status >= 200 && online.status < 300){
if ((online.status >= 200 && online.status < 300) || online.status === 401) {
statusDisplay.text("Connected");
@ -8673,7 +8671,7 @@
}
}, 3000);
}, 10000);