diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.ts b/main/http_server/axe-os/src/app/components/edit/edit.component.ts index de02df109..991a2769b 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.ts +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.ts @@ -147,10 +147,10 @@ export class EditComponent implements OnInit { Validators.max(65353) ]], stratumUser: [info.stratumUser, [Validators.required]], - stratumPassword: ['password', [Validators.required]], + stratumPassword: ['*****', [Validators.required]], hostname: [info.hostname, [Validators.required]], ssid: [info.ssid, [Validators.required]], - wifiPass: ['password'], + wifiPass: ['*****'], coreVoltage: [info.coreVoltage, [Validators.required]], frequency: [info.frequency, [Validators.required]], autofanspeed: [info.autofanspeed == 1, [Validators.required]], @@ -187,10 +187,13 @@ export class EditComponent implements OnInit { const form = this.form.getRawValue(); - if (form.wifiPass === 'password') { + // Allow an empty wifi password + form.wifiPass = form.wifiPass == null ? '' : form.wifiPass; + + if (form.wifiPass === '*****') { delete form.wifiPass; } - if (form.stratumPassword === 'password') { + if (form.stratumPassword === '*****') { delete form.stratumPassword; } diff --git a/main/http_server/axe-os/src/app/components/settings/settings.component.ts b/main/http_server/axe-os/src/app/components/settings/settings.component.ts index d274ca1b8..a6719cfcf 100644 --- a/main/http_server/axe-os/src/app/components/settings/settings.component.ts +++ b/main/http_server/axe-os/src/app/components/settings/settings.component.ts @@ -70,9 +70,9 @@ export class SettingsComponent { Validators.max(65353) ]], stratumUser: [info.stratumUser, [Validators.required]], - stratumPassword: ['password', [Validators.required]], + stratumPassword: ['*****', [Validators.required]], ssid: [info.ssid, [Validators.required]], - wifiPass: ['password'], + wifiPass: ['*****'], coreVoltage: [info.coreVoltage, [Validators.required]], frequency: [info.frequency, [Validators.required]], autofanspeed: [info.autofanspeed == 1, [Validators.required]], @@ -116,10 +116,13 @@ export class SettingsComponent { form.invertfanpolarity = form.invertfanpolarity == true ? 1 : 0; form.autofanspeed = form.autofanspeed == true ? 1 : 0; - if (form.wifiPass === 'password') { + // Allow an empty wifi password + form.wifiPass = form.wifiPass == null ? '' : form.wifiPass; + + if (form.wifiPass === '*****') { delete form.wifiPass; } - if (form.stratumPassword === 'password') { + if (form.stratumPassword === '*****') { delete form.stratumPassword; }