docs: update webpages for version v1.3.37
This commit is contained in:
parent
55db6d76ab
commit
b8db01529b
@ -202,6 +202,16 @@
|
|||||||
let response = this.responseText;
|
let response = this.responseText;
|
||||||
try {
|
try {
|
||||||
const jsonResponse = JSON.parse(response);
|
const jsonResponse = JSON.parse(response);
|
||||||
|
|
||||||
|
// Handle progress updates
|
||||||
|
if (jsonResponse.progress !== undefined) {
|
||||||
|
const percent = jsonResponse.progress;
|
||||||
|
progress.style.width = percent + '%';
|
||||||
|
progress.textContent = Math.round(percent) + '%';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle success/error messages
|
||||||
response = jsonResponse.message;
|
response = jsonResponse.message;
|
||||||
|
|
||||||
if (jsonResponse.restart) {
|
if (jsonResponse.restart) {
|
||||||
@ -218,12 +228,9 @@
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (!isNaN(response)) {
|
console.error('JSON parse error:', e);
|
||||||
const percent = parseInt(response);
|
status.textContent = 'Update failed: Invalid response from server';
|
||||||
progress.style.width = percent + '%';
|
status.classList.add('error');
|
||||||
progress.textContent = percent + '%';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status.textContent = response;
|
status.textContent = response;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "1.3.36"
|
version = "1.3.37"
|
||||||
|
|
||||||
#test
|
#test
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user