]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/login/login.component.ts
add TOC to dependencies guide
[github/Chocobozzz/PeerTube.git] / client / src / app / login / login.component.ts
index 8e88225108d3c615fdd8b2d38b7e3a56a972ce70..4bae3ae5c950b9347c9584ad406c401d13ec8a36 100644 (file)
@@ -16,6 +16,7 @@ import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
 })
 
 export class LoginComponent extends FormReactive implements OnInit {
+  @ViewChild('emailInput') input: ElementRef
   @ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef
   @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef
 
@@ -47,6 +48,8 @@ export class LoginComponent extends FormReactive implements OnInit {
       username: this.loginValidatorsService.LOGIN_USERNAME,
       password: this.loginValidatorsService.LOGIN_PASSWORD
     })
+
+    this.input.nativeElement.focus()
   }
 
   login () {
@@ -69,7 +72,7 @@ export class LoginComponent extends FormReactive implements OnInit {
   askResetPassword () {
     this.userService.askResetPassword(this.forgotPasswordEmail)
       .subscribe(
-        res => {
+        () => {
           const message = this.i18n(
             'An email with the reset password instructions will be sent to {{email}}.',
             { email: this.forgotPasswordEmail }