X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Flogin%2Flogin.component.ts;h=9a68c12faa4d358c74d01f86c9130c08d1de6b87;hb=e69219184b1a3262ec5e617d30337b6431c9840c;hp=a91522db367e41460592deefd6388ea72f7e7be8;hpb=e309822b93d9b69f30cbe830ef3d09dfdb2c13b2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index a91522db3..9a68c12fa 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts @@ -55,7 +55,11 @@ export class LoginComponent extends FormReactive implements OnInit { .subscribe( () => this.redirectService.redirectToHomepage(), - err => this.error = err.message + err => { + if (err.message.indexOf('credentials are invalid') !== -1) this.error = this.i18n('Incorrect username or password.') + else if (err.message.indexOf('blocked') !== -1) this.error = this.i18n('You account is blocked.') + else this.error = err.message + } ) } @@ -64,7 +68,7 @@ export class LoginComponent extends FormReactive implements OnInit { .subscribe( res => { const message = this.i18n( - 'An email with the reset password instructions will be sent to {{ email }}.', + 'An email with the reset password instructions will be sent to {{email}}.', { email: this.forgotPasswordEmail } ) this.notificationsService.success(this.i18n('Success'), message)