diff --git a/frontend/README.md b/frontend/README.md index a690fb2..a628775 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -21,7 +21,7 @@ export const environment = { baseUrl: "YOUR_API_URL_HERE", // Guest account - guestMail: "YOUR_GUEST_EMAIL_HERE", + guestEmail: "YOUR_GUEST_EMAIL_HERE", guestPassword: "YOUR_GUEST_PASSWORD_HERE", }; ``` diff --git a/frontend/src/app/components/auth/forgot-password/forgot-password.component.html b/frontend/src/app/components/auth/forgot-password/forgot-password.component.html index ac55434..0890840 100644 --- a/frontend/src/app/components/auth/forgot-password/forgot-password.component.html +++ b/frontend/src/app/components/auth/forgot-password/forgot-password.component.html @@ -1,50 +1,50 @@
Forgot your password?
- @if (!queryEmail && !sendMailSuccess && !queryEmailSuccess) { + @if (!queryEmail && !sendEmailSuccess && !queryEmailSuccess) {

We will send you an email with instructions to reset your password.

-
+
- @if (!mail.valid && mail.touched) { + @if (!email.valid && email.touched) {

Please enter your email

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

This is not a valid email format

}}
- } @else { @if (sendMailSuccess) { + } @else { @if (sendEmailSuccess) {

If the email you entered exists on our server, you will receive a @@ -134,7 +134,7 @@

- @if (!mail.valid && mail.touched) { + @if (!email.valid && email.touched) {

Please enter your email

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

This is not a valid email format

}}
@@ -40,7 +40,7 @@ [imgPath]="'arrow_right'" [imgReverse]="true" [disabled]=" - (!isUserEmailValid(authData.mail) && authData.mail.length > 0) || + (!isUserEmailValid(authData.email) && authData.email.length > 0) || authData.send " > diff --git a/frontend/src/app/components/auth/landing-page/landing-page.component.ts b/frontend/src/app/components/auth/landing-page/landing-page.component.ts index e3e11eb..e11d02f 100644 --- a/frontend/src/app/components/auth/landing-page/landing-page.component.ts +++ b/frontend/src/app/components/auth/landing-page/landing-page.component.ts @@ -15,7 +15,7 @@ import { AuthService } from '../../../services/auth.service'; }) export class LandingPageComponent { authData = { - mail: '', + email: '', send: false, }; @@ -45,13 +45,13 @@ export class LandingPageComponent { * If the form is valid, checks for duplicate email addresses. * * @param ngForm The submitted form. - * @param mailInput The input field for the email. + * @param emailInput The input field for the email. */ - async onSubmit(ngForm: NgForm, mailInput: any): Promise { + async onSubmit(ngForm: NgForm, emailInput: any): Promise { if (ngForm.submitted && ngForm.form.valid) { await this.checkDuplicatesEmail(); } else { - mailInput.control.markAsTouched(); + emailInput.control.markAsTouched(); } } @@ -61,15 +61,15 @@ export class LandingPageComponent { * Handles UI state and errors accordingly. */ private async checkDuplicatesEmail(): Promise { - const email = this.authData.mail.trim().toLowerCase(); + const email = this.authData.email.trim().toLowerCase(); if (!email) return; this.authData.send = true; try { - await this.authService.checkAuthUserMail({ email }); + await this.authService.checkAuthUserEmail({ email }); this.errorService.clearError(); - this.router.navigate(['/register'], { queryParams: { mail: email } }); + this.router.navigate(['/register'], { queryParams: { email: email } }); } catch (error) { this.errorService.handleError(error); } finally { diff --git a/frontend/src/app/components/auth/login/login.component.html b/frontend/src/app/components/auth/login/login.component.html index 45848c7..a0889e3 100644 --- a/frontend/src/app/components/auth/login/login.component.html +++ b/frontend/src/app/components/auth/login/login.component.html @@ -1,55 +1,50 @@