]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/login/login.component.ts
Merge branch 'hotfix/docker' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / login / login.component.ts
index 7553e64564220907cf323ed7c88f1279893d28c5..212a8ff1f60698c1f62c6022cea955c77083f62b 100644 (file)
@@ -19,7 +19,6 @@ import { Router } from '@angular/router'
 export class LoginComponent extends FormReactive implements OnInit {
   @ViewChild('emailInput') input: ElementRef
   @ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef
-  @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef
 
   error: string = null
   forgotPasswordEmail = ''
@@ -45,6 +44,10 @@ export class LoginComponent extends FormReactive implements OnInit {
     return this.serverService.getConfig().signup.allowed === true
   }
 
+  isEmailDisabled () {
+    return this.serverService.getConfig().email.enabled === false
+  }
+
   ngOnInit () {
     this.buildForm({
       username: this.loginValidatorsService.LOGIN_USERNAME,
@@ -96,10 +99,6 @@ export class LoginComponent extends FormReactive implements OnInit {
       )
   }
 
-  onForgotPasswordModalShown () {
-    this.forgotPasswordEmailInput.nativeElement.focus()
-  }
-
   openForgotPasswordModal () {
     this.openedForgotPasswordModal = this.modalService.open(this.forgotPasswordModal)
   }