aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/signup/signup.component.ts
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-04 22:58:26 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-04 22:58:26 -0400
commitf70e86470f7083cda1949ff97556d9e39578ce1d (patch)
tree5cc8a3e1089409e10fd92896625605a7f8f6897b /ufund-ui/src/app/components/signup/signup.component.ts
parentedfc9a8450d140ba1650b38e4b707000710b2faa (diff)
parent5a5d31896d79a736bce33b7d1aa7b3168ba308a9 (diff)
downloadJellySolutions-f70e86470f7083cda1949ff97556d9e39578ce1d.tar.gz
JellySolutions-f70e86470f7083cda1949ff97556d9e39578ce1d.tar.bz2
JellySolutions-f70e86470f7083cda1949ff97556d9e39578ce1d.zip
Merge branch 'main' into need-list-abstraction
# Conflicts: # ufund-ui/src/app/components/cupboard/cupboard.component.ts # ufund-ui/src/app/components/funding-basket/funding-basket.component.html # ufund-ui/src/app/components/funding-basket/funding-basket.component.ts # ufund-ui/src/app/components/need-list/need-list.component.html # ufund-ui/src/app/components/need-list/need-list.component.ts # ufund-ui/src/app/components/need-page/need-page.component.html
Diffstat (limited to 'ufund-ui/src/app/components/signup/signup.component.ts')
-rw-r--r--ufund-ui/src/app/components/signup/signup.component.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/ufund-ui/src/app/components/signup/signup.component.ts b/ufund-ui/src/app/components/signup/signup.component.ts
index 9c37211..2762d03 100644
--- a/ufund-ui/src/app/components/signup/signup.component.ts
+++ b/ufund-ui/src/app/components/signup/signup.component.ts
@@ -1,4 +1,4 @@
-import {Component} from '@angular/core';
+import {Component, ElementRef, ViewChild} from '@angular/core';
import {UsersService} from '../../services/users.service';
import {Router} from '@angular/router';
import {BehaviorSubject} from 'rxjs';
@@ -29,6 +29,7 @@ export class SignupComponent {
protected ableToCreateAccount = new BehaviorSubject(false)
protected passwordRequirements: PasswordRequirements = new PasswordRequirements()
protected strength = new BehaviorSubject(0)
+ @ViewChild("username") usernameInput!: ElementRef<HTMLInputElement>
constructor(
protected usersService: UsersService,
@@ -56,11 +57,11 @@ export class SignupComponent {
validate(username: string, passConfirm:string, password: string) {
this.passwordsMatch.next(false)
- this.usernameStatusText.next("")
+ this.usernameInput.nativeElement.setAttribute("style", "")
this.checkPasswordStrength(password);
if (username === "") {
- this.usernameStatusText.next("Username field can't be blank")
+ this.usernameInput.nativeElement.setAttribute("style", "border-color: #ff0000")
}
if (passConfirm && password === passConfirm) {
@@ -105,8 +106,6 @@ export class SignupComponent {
this.passwordStatusText.next("")
} else if (strength == 0) {
this.passwordStatusText.next("")
- } else {
- this.passwordStatusText.next("Password must meet requirements")
}
this.strength.next(strength)