i18n for login page.

This commit is contained in:
Florian THIERRY
2024-09-21 11:22:35 +02:00
parent fd5ad7e88e
commit 3935f6ad21
6 changed files with 24 additions and 37 deletions

View File

@@ -66,16 +66,12 @@ export class LoginService {
.login(state.request)
.then((response) => {
this.authenticationService.authenticate(response.accessToken, response.refreshToken);
this.snackBar.open('Authentication succeeded!', 'Close', {
duration: 5000,
});
this.snackBar.open($localize`Authentication succeeded!`, $localize`Close`, { duration: 5000 });
this.router.navigate(['/home']);
})
.catch((error) => {
console.error(error);
this.snackBar.open('Authentication failed.', 'Close', {
duration: 5000,
});
this.snackBar.open($localize`Authentication failed.`, $localize`Close`, { duration: 5000 });
});
}
}