Admin: bloquer update firmware en mode hotspot avec message explicatif
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -454,6 +454,7 @@ window.onload = function() {
|
|||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log("Getting SQLite config table:");
|
console.log("Getting SQLite config table:");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
window._adminConfig = response;
|
||||||
//device name
|
//device name
|
||||||
const deviceName = document.getElementById("device_name");
|
const deviceName = document.getElementById("device_name");
|
||||||
deviceName.value = response.deviceName;
|
deviceName.value = response.deviceName;
|
||||||
@@ -781,6 +782,12 @@ function update_config(param, value){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateFirmware() {
|
function updateFirmware() {
|
||||||
|
// Check if connected to internet (not in hotspot mode)
|
||||||
|
if (window._adminConfig && window._adminConfig.WIFI_status === 'hotspot') {
|
||||||
|
alert('Mise à jour impossible en mode hotspot.\nConnectez d\'abord le capteur à un réseau WiFi avec accès internet.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
console.log("Starting comprehensive firmware update...");
|
console.log("Starting comprehensive firmware update...");
|
||||||
|
|
||||||
// Show loading state
|
// Show loading state
|
||||||
|
|||||||
Reference in New Issue
Block a user