Fix: config.json -> get_config_sqlite dans wifi.html
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -413,11 +413,12 @@ function wifi_scan(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
fetch('../config.json')
|
$.ajax({
|
||||||
.then(response => response.json())
|
url: 'launcher.php?type=get_config_sqlite',
|
||||||
.then(data => {
|
dataType: 'json',
|
||||||
console.log("Getting config file (onload)");
|
method: 'GET',
|
||||||
const deviceID = data.deviceID.trim().toUpperCase();
|
success: function(data) {
|
||||||
|
console.log("Getting config (onload)");
|
||||||
const deviceName = data.deviceName;
|
const deviceName = data.deviceName;
|
||||||
|
|
||||||
function updateSidebarDeviceName(deviceName) {
|
function updateSidebarDeviceName(deviceName) {
|
||||||
@@ -476,8 +477,11 @@ function wifi_scan(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
},
|
||||||
.catch(error => console.error('Error loading config.json:', error));
|
error: function(xhr, status, error) {
|
||||||
|
console.error('AJAX request failed:', status, error);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user