Skip to content

Commit

Permalink
add translation for pw reset header
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Apr 3, 2024
1 parent 8b70b9b commit 8f61116
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
</div>

<div class="buttons">
<button type="button" class="button is-info" [disabled]="!canPressButton" (click)="requestNewEmail()">
<button type="button"
class="button is-info"
[ngClass]="{'is-loading': loading}"
[disabled]="!canPressButton"
(click)="requestNewEmail()"
>
{{ 'navbar.email-verification.request-btn' | translate }}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AuthService } from '../../../../services/auth.service';
export class HeaderBarVerifyEmailComponent {

canPressButton = true;
loading = false;

constructor(
private authService: AuthService,
Expand All @@ -18,15 +19,18 @@ export class HeaderBarVerifyEmailComponent {

requestNewEmail() {
this.canPressButton = false;
this.loading = true;
this.authService.requestNewVerificationEmail().subscribe({
next({ status }) {
console.log(status);
alert('Email sent!');
this.loading = false;
},

error(err: any) {
console.log(err);
alert('Something went wrong! Please try again later. ');
this.loading = false;
}
});
}
Expand Down
5 changes: 1 addition & 4 deletions src/app/auth/login/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { faEye, faEyeSlash, faLock, faUser } from '@fortawesome/free-solid-svg-icons';
import { faUser } from '@fortawesome/free-solid-svg-icons';
import { faDiscord, faTwitch } from '@fortawesome/free-brands-svg-icons';
import { UserService } from '../../../services/user.service';
import { LoginDetails, LoginResponse, LoginResponseStatus } from '../../../model/auth';
Expand All @@ -25,9 +25,6 @@ export class LoginComponent {
mfaNeeded: boolean = !!localStorage.getItem('alwaysShowMfa');

iconUser = faUser;
iconPadlock = faLock;
iconEye = faEye;
iconEyeSlash = faEyeSlash;
iconDiscord = faDiscord;
iconTwitch = faTwitch;

Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/password-reset/password-reset.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section class="section container">
<h1 class="title">Reset your password!</h1>
<h1 class="title">{{'auth.passwordReset.submit' | translate}}</h1>

<div class="notification" [class]="notificationClass" *ngIf="errorTranslationKey">
<button class="delete" (click)="errorTranslationKey = null"></button>
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n
Submodule i18n updated from 048525 to 00b44f

0 comments on commit 8f61116

Please sign in to comment.