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) {
|
||||
console.log("Getting SQLite config table:");
|
||||
console.log(response);
|
||||
window._adminConfig = response;
|
||||
//device name
|
||||
const deviceName = document.getElementById("device_name");
|
||||
deviceName.value = response.deviceName;
|
||||
@@ -781,8 +782,14 @@ function update_config(param, value){
|
||||
}
|
||||
|
||||
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...");
|
||||
|
||||
|
||||
// Show loading state
|
||||
const updateBtn = document.getElementById('updateBtn');
|
||||
const updateBtnText = document.getElementById('updateBtnText');
|
||||
|
||||
Reference in New Issue
Block a user