mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-09 00:14:55 +00:00
Prepare AutoAP enable/disable
This commit is contained in:
parent
9775c601bb
commit
d8b658df30
5 changed files with 79 additions and 38 deletions
|
|
@ -237,8 +237,10 @@ function loadSettings(settings) {
|
|||
RebootModeTime.disabled = !RebootModeCheckbox.check;
|
||||
|
||||
// WiFi Auto AP
|
||||
document.getElementById("wifi.autoAP.enabled").checked = settings.wifi.autoAP.enabled;
|
||||
document.getElementById("wifi.autoAP.password").value = settings.wifi.autoAP.password;
|
||||
document.getElementById("wifi.autoAP.timeout").value = settings.wifi.autoAP.timeout;
|
||||
toggleWiFiAutoAPFields();
|
||||
|
||||
// OTA
|
||||
document.getElementById("ota.username").value = settings.ota.username;
|
||||
|
|
@ -432,6 +434,18 @@ WebadminCheckbox.addEventListener("change", function () {
|
|||
WebadminPassword.disabled = !this.checked;
|
||||
});
|
||||
|
||||
// WiFi Auto AP Switches
|
||||
const WiFiAutoAPCheckbox = document.querySelector('input[name="wifi.autoAP.enabled"]');
|
||||
WiFiAutoAPCheckbox.addEventListener("change", function () {
|
||||
toggleWiFiAutoAPFields();
|
||||
});
|
||||
|
||||
function toggleWiFiAutoAPFields() {
|
||||
const isEnabled = WiFiAutoAPCheckbox.checked;
|
||||
const autoAPConfig = document.getElementById('wifi-autoap-config');
|
||||
if (autoAPConfig) autoAPConfig.style.display = isEnabled ? 'block' : 'none';
|
||||
}
|
||||
|
||||
|
||||
document.querySelector(".new button").addEventListener("click", function () {
|
||||
const networksContainer = document.querySelector(".list-networks");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue