WiFi Channel Settings.

This commit is contained in:
Robin Davies
2021-08-20 10:35:37 -04:00
parent 140f2abd39
commit f6aa331d77
40 changed files with 2409 additions and 597 deletions
+45
View File
@@ -0,0 +1,45 @@
export default class WifiConfigSettings {
deserialize(input: any) : WifiConfigSettings{
this.valid = input.valid;
this.wifiWarningGiven = input.wifiWarningGiven;
this.rebootRequired = input.rebootRequired;
this.enable = input.enable;
this.hotspotName = input.hotspotName;
this.hasPassword = input.hasPassword;
this.password = input.password;
this.countryCode = input.countryCode;
this.channel = input.channel;
return this;
}
clone() : WifiConfigSettings {
return this.deserialize(this);
}
valid: boolean = true;
wifiWarningGiven: boolean = false;
enable: boolean = true;
hasPassword: boolean = false;
rebootRequired = false;
hotspotName: string = "pipedal";
password: string = "";
countryCode: string = "US";
channel: string = "g6";
getSummaryText() {
let result: string;
if (!this.valid) {
result = "Not available.";
} else if (!this.enable) {
result = "Disabled.";
} else {
result = this.hotspotName;
}
if (this.rebootRequired)
{
result += " (Restart required)";
}
return result;
}
}