diff --git a/frontend/src/app/components/auth/auth.component.html b/frontend/src/app/components/auth/auth.component.html index 562c0f5..64d268a 100644 --- a/frontend/src/app/components/auth/auth.component.html +++ b/frontend/src/app/components/auth/auth.component.html @@ -8,7 +8,7 @@ id="form" class="register-form" #taskForm="ngForm" - (ngSubmit)="onSubmit(taskForm)" + (ngSubmit)="onSubmit(taskForm, mail)" onsubmit="return false" > +
+ @if (!mail.valid && mail.touched) { +

Please enter your email

+ } @else { @if (mail.touched && authData.mail.length > 0 && + !isUserEmailValid(authData.mail.toLowerCase())) { +

This is not a valid email format

+ }} +
-
+
Sign Up
+ @if (registrationSuccess) { +
+

+ Please check your email to confirm your email address and complete the + registration process. +

+ To the login +
+ } @else {
+ }
diff --git a/frontend/src/app/components/auth/register/register.component.scss b/frontend/src/app/components/auth/register/register.component.scss index a948147..93dc4c4 100644 --- a/frontend/src/app/components/auth/register/register.component.scss +++ b/frontend/src/app/components/auth/register/register.component.scss @@ -37,6 +37,25 @@ section { } } +.reg-success { + p { + color: $black; + font-size: 18px; + font-weight: 400; + margin: 36px 0 24px 0; + } + a { + font-size: 18px; + font-weight: 700; + color: $blue; + text-decoration: none; + cursor: pointer; + &:hover { + text-decoration: underline; + } + } +} + .error-msg { display: flex; align-items: center; @@ -49,14 +68,6 @@ section { font-size: 12px !important; font-weight: 400 !important; } - a { - color: $red; - text-decoration: underline; - cursor: pointer; - &:hover { - text-decoration: none; - } - } } .register-form { diff --git a/frontend/src/app/components/auth/register/register.component.ts b/frontend/src/app/components/auth/register/register.component.ts index 8bff774..8a53220 100644 --- a/frontend/src/app/components/auth/register/register.component.ts +++ b/frontend/src/app/components/auth/register/register.component.ts @@ -2,11 +2,12 @@ import { Component } from '@angular/core'; import { BtnLargeComponent } from '../../../shared/components/btn-large/btn-large.component'; import { FormsModule, NgForm } from '@angular/forms'; import { ActivatedRoute, RouterLink } from '@angular/router'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'app-register', standalone: true, - imports: [BtnLargeComponent, FormsModule, RouterLink], + imports: [CommonModule, BtnLargeComponent, FormsModule, RouterLink], templateUrl: './register.component.html', styleUrl: './register.component.scss', }) @@ -17,6 +18,8 @@ export class RegisterComponent { passwordConfirm: '', }; + registrationSuccess: boolean = false; + constructor(private route: ActivatedRoute) {} ngOnInit(): void { @@ -34,6 +37,7 @@ export class RegisterComponent { if (ngForm.submitted && ngForm.form.valid) { console.log(this.authData); ngForm.form.reset(); + this.registrationSuccess = true; } } } diff --git a/frontend/src/app/shared/components/btn-large/btn-large.component.scss b/frontend/src/app/shared/components/btn-large/btn-large.component.scss index fc0735e..cb30098 100644 --- a/frontend/src/app/shared/components/btn-large/btn-large.component.scss +++ b/frontend/src/app/shared/components/btn-large/btn-large.component.scss @@ -3,7 +3,7 @@ .btn { padding: 12px 24px; width: fit-content; - box-shadow: 1px 1px 3px $black; + box-shadow: 1px 1px 3px rgba($black, 0.5); border-radius: 24px; color: $white; background-color: $blue; diff --git a/frontend/src/assets/img/backgrounds/login.png b/frontend/src/assets/img/backgrounds/login.png new file mode 100644 index 0000000..5672ce6 Binary files /dev/null and b/frontend/src/assets/img/backgrounds/login.png differ