From f56653791d113d318bb59d572ed71aaa171ba1ac Mon Sep 17 00:00:00 2001 From: mrv777 Date: Fri, 27 Sep 2024 15:58:25 -0500 Subject: [PATCH 1/4] fix: Password visibility toggle --- .../axe-os/src/app/components/edit/edit.component.html | 7 +++++-- .../axe-os/src/app/components/edit/edit.component.scss | 5 +++++ .../axe-os/src/app/components/edit/edit.component.ts | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.html b/main/http_server/axe-os/src/app/components/edit/edit.component.html index 634f92fd3..afc4c5fde 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.html +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.html @@ -45,8 +45,11 @@
-
- +
+ +
diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.scss b/main/http_server/axe-os/src/app/components/edit/edit.component.scss index e69de29bb..bfff955e4 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.scss +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.scss @@ -0,0 +1,5 @@ +.pi { + right: 1rem; + font-size: 1.5rem; + top: 1rem; +} 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 991a2769b..51fef1bb1 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 @@ -211,4 +211,10 @@ export class EditComponent implements OnInit { }); } + showStratumPassword: boolean = false; + + toggleStratumPasswordVisibility() { + this.showStratumPassword = !this.showStratumPassword; + } + } From 35369aff81be85546b7d73b53ef333c3f6db74a7 Mon Sep 17 00:00:00 2001 From: mrv777 Date: Fri, 27 Sep 2024 16:36:34 -0500 Subject: [PATCH 2/4] fix: No need to use ***** for default password --- .../axe-os/src/app/components/edit/edit.component.html | 3 ++- .../axe-os/src/app/components/edit/edit.component.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.html b/main/http_server/axe-os/src/app/components/edit/edit.component.html index afc4c5fde..8db000670 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.html +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.html @@ -49,7 +49,8 @@ + [type]="showStratumPassword ? 'text' : 'password'" + placeholder="Saved stratum password hidden" />
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 51fef1bb1..71cddadb9 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,7 +147,7 @@ export class EditComponent implements OnInit { Validators.max(65353) ]], stratumUser: [info.stratumUser, [Validators.required]], - stratumPassword: ['*****', [Validators.required]], + stratumPassword: [''], hostname: [info.hostname, [Validators.required]], ssid: [info.ssid, [Validators.required]], wifiPass: ['*****'], @@ -193,7 +193,7 @@ export class EditComponent implements OnInit { if (form.wifiPass === '*****') { delete form.wifiPass; } - if (form.stratumPassword === '*****') { + if (form.stratumPassword.length === 0) { delete form.stratumPassword; } From c7dd7506dce98e48dca0fef1d419e77897fc0c9c Mon Sep 17 00:00:00 2001 From: mrv777 Date: Fri, 27 Sep 2024 17:45:53 -0500 Subject: [PATCH 3/4] fix: Set back to old password check & use dirty to show toggle --- .../src/app/components/edit/edit.component.html | 11 ++++++++--- .../axe-os/src/app/components/edit/edit.component.ts | 10 +++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.html b/main/http_server/axe-os/src/app/components/edit/edit.component.html index 8db000670..1cc650467 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.html +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.html @@ -15,8 +15,12 @@
-
- +
+ +
@@ -46,7 +50,8 @@
- Date: Fri, 27 Sep 2024 17:51:34 -0500 Subject: [PATCH 4/4] fix: Update placeholder text --- .../axe-os/src/app/components/edit/edit.component.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.html b/main/http_server/axe-os/src/app/components/edit/edit.component.html index 1cc650467..b7ed6795c 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.html +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.html @@ -20,7 +20,8 @@ [ngClass]="{'pi-eye': !showWifiPassword, 'pi-eye-slash': showWifiPassword}" (click)="toggleWifiPasswordVisibility()" style="cursor: pointer;"> + [type]="showWifiPassword ? 'text' : 'password'" + placeholder="Enter WiFi password" />
@@ -55,7 +56,7 @@ (click)="toggleStratumPasswordVisibility()" style="cursor: pointer;"> + placeholder="Enter stratum password" />