diff options
Diffstat (limited to 'client/src/app/+signup/+register/register.component.ts')
-rw-r--r-- | client/src/app/+signup/+register/register.component.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts index 153a6d2b5..5b6762631 100644 --- a/client/src/app/+signup/+register/register.component.ts +++ b/client/src/app/+signup/+register/register.component.ts | |||
@@ -30,6 +30,8 @@ export class RegisterComponent implements OnInit { | |||
30 | administrator: '' | 30 | administrator: '' |
31 | } | 31 | } |
32 | 32 | ||
33 | videoUploadDisabled: boolean | ||
34 | |||
33 | formStepUser: FormGroup | 35 | formStepUser: FormGroup |
34 | formStepChannel: FormGroup | 36 | formStepChannel: FormGroup |
35 | 37 | ||
@@ -52,6 +54,8 @@ export class RegisterComponent implements OnInit { | |||
52 | ngOnInit (): void { | 54 | ngOnInit (): void { |
53 | this.serverConfig = this.route.snapshot.data.serverConfig | 55 | this.serverConfig = this.route.snapshot.data.serverConfig |
54 | 56 | ||
57 | this.videoUploadDisabled = this.serverConfig.user.videoQuota === 0 | ||
58 | |||
55 | this.instanceService.getAbout() | 59 | this.instanceService.getAbout() |
56 | .subscribe( | 60 | .subscribe( |
57 | async about => { | 61 | async about => { |
@@ -102,7 +106,7 @@ export class RegisterComponent implements OnInit { | |||
102 | this.error = null | 106 | this.error = null |
103 | 107 | ||
104 | const body: UserRegister = await this.hooks.wrapObject( | 108 | const body: UserRegister = await this.hooks.wrapObject( |
105 | Object.assign(this.formStepUser.value, { channel: this.formStepChannel.value }), | 109 | Object.assign(this.formStepUser.value, { channel: this.videoUploadDisabled ? undefined : this.formStepChannel.value }), |
106 | 'signup', | 110 | 'signup', |
107 | 'filter:api.signup.registration.create.params' | 111 | 'filter:api.signup.registration.create.params' |
108 | ) | 112 | ) |