import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
import { AuthService } from '../core'
import { FormReactive } from '../shared'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
import { LoginValidatorsService } from '@app/shared/forms/form-validators/login-validators.service'
import { AuthService } from '../core'
import { FormReactive } from '../shared'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
import { LoginValidatorsService } from '@app/shared/forms/form-validators/login-validators.service'
- @ViewChild('forgotPasswordModal') forgotPasswordModal: ModalDirective
- @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef
+ @ViewChild('emailInput', { static: true }) input: ElementRef
+ @ViewChild('forgotPasswordModal', { static: true }) forgotPasswordModal: ElementRef
private loginValidatorsService: LoginValidatorsService,
private authService: AuthService,
private userService: UserService,
private loginValidatorsService: LoginValidatorsService,
private authService: AuthService,
private userService: UserService,
- return this.serverService.getConfig().signup.allowed === true
+ return this.serverConfig.signup.allowed === true
+ }
+
+ get instancesIndexUrl () {
+ return this.serverConfig.followings.instance.autoFollowIndex.indexUrl || 'https://instances.joinpeertube.org'
+ }
+
+ isEmailDisabled () {
+ return this.serverConfig.email.enabled === false
this.buildForm({
username: this.loginValidatorsService.LOGIN_USERNAME,
password: this.loginValidatorsService.LOGIN_PASSWORD
})
this.buildForm({
username: this.loginValidatorsService.LOGIN_USERNAME,
password: this.loginValidatorsService.LOGIN_PASSWORD
})