]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/login/login.component.ts
Implement user blocking on server side
[github/Chocobozzz/PeerTube.git] / client / src / app / login / login.component.ts
index 56f992b5d605baa8ce342e86249cf3e6bc01d034..9a68c12faa4d358c74d01f86c9130c08d1de6b87 100644 (file)
@@ -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
+        }
       )
   }