progress new ui

This commit is contained in:
2024-12-17 01:39:47 +01:00
parent 74f9c17461
commit 5fedbec433
9 changed files with 113 additions and 87 deletions

View File

@@ -16,7 +16,9 @@ export class NetworkConfigView {
private readonly base_topic: HTMLInputElement;
private readonly ssidlist: HTMLElement;
constructor(controller: Controller) {
constructor(controller: Controller, publicIp: string) {
(document.getElementById("remote_ip") as HTMLElement).innerText = publicIp;
this.ap_ssid = (document.getElementById("ap_ssid") as HTMLInputElement);
this.ap_ssid.onchange = controller.configChanged
@@ -48,10 +50,10 @@ export class NetworkConfigView {
getConfig(): NetworkConfig {
return {
ap_ssid: this.ap_ssid.value,
ssid: this.ssid.value,
password: this.password.value,
mqtt_url: this.mqtt_url.value,
base_topic: this.base_topic.value
ssid: this.ssid.value ?? null,
password: this.password.value ?? null,
mqtt_url: this.mqtt_url.value ?? null,
base_topic: this.base_topic.value ?? null
}
}
}