X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bsignup%2F%2Bregister%2Fregister-step-user.component.ts;h=9193540b4e2e446e360706c84b940361ada2d1bf;hb=09c55770bcc96785fb1f199b4cd8ce66b545486a;hp=6c96f20b448af548bd9112a2fb828c37e822bb0b;hpb=00aab0666c6f772548c160fdfa871a8843b88f37;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+signup/+register/register-step-user.component.ts b/client/src/app/+signup/+register/register-step-user.component.ts index 6c96f20b4..9193540b4 100644 --- a/client/src/app/+signup/+register/register-step-user.component.ts +++ b/client/src/app/+signup/+register/register-step-user.component.ts @@ -1,10 +1,16 @@ +import { concat, of } from 'rxjs' +import { pairwise } from 'rxjs/operators' import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' -import { AuthService } from '@app/core' -import { FormReactive, UserService, UserValidatorsService } from '@app/shared' -import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { FormGroup } from '@angular/forms' -import { pairwise } from 'rxjs/operators' -import { concat, of } from 'rxjs' +import { UserService } from '@app/core' +import { + USER_DISPLAY_NAME_REQUIRED_VALIDATOR, + USER_EMAIL_VALIDATOR, + USER_PASSWORD_VALIDATOR, + USER_TERMS_VALIDATOR, + USER_USERNAME_VALIDATOR +} from '@app/shared/form-validators/user-validators' +import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' @Component({ selector: 'my-register-step-user', @@ -13,6 +19,7 @@ import { concat, of } from 'rxjs' }) export class RegisterStepUserComponent extends FormReactive implements OnInit { @Input() hasCodeOfConduct = false + @Input() videoUploadDisabled = false @Output() formBuilt = new EventEmitter() @Output() termsClick = new EventEmitter() @@ -20,9 +27,7 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit { constructor ( protected formValidatorService: FormValidatorService, - private authService: AuthService, - private userService: UserService, - private userValidatorsService: UserValidatorsService + private userService: UserService ) { super() } @@ -33,11 +38,11 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit { ngOnInit () { this.buildForm({ - displayName: this.userValidatorsService.USER_DISPLAY_NAME_REQUIRED, - username: this.userValidatorsService.USER_USERNAME, - password: this.userValidatorsService.USER_PASSWORD, - email: this.userValidatorsService.USER_EMAIL, - terms: this.userValidatorsService.USER_TERMS + displayName: USER_DISPLAY_NAME_REQUIRED_VALIDATOR, + username: USER_USERNAME_VALIDATOR, + password: USER_PASSWORD_VALIDATOR, + email: USER_EMAIL_VALIDATOR, + terms: USER_TERMS_VALIDATOR }) setTimeout(() => this.formBuilt.emit(this.form))