aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup/+register/register.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-29 11:16:36 +0200
committerChocobozzz <me@florianbigard.com>2021-10-29 11:16:36 +0200
commitbd898dd76babf6ab33a0040297bfb40a69a69dda (patch)
tree6d972d754bafe6b79a7f8d08ad26783ef2489f3e /client/src/app/+signup/+register/register.component.ts
parentdb581cf7b99eb60d2e6d9bee5c020ef22b0a1a41 (diff)
downloadPeerTube-bd898dd76babf6ab33a0040297bfb40a69a69dda.tar.gz
PeerTube-bd898dd76babf6ab33a0040297bfb40a69a69dda.tar.zst
PeerTube-bd898dd76babf6ab33a0040297bfb40a69a69dda.zip
Add message if registration is disabled
Diffstat (limited to 'client/src/app/+signup/+register/register.component.ts')
-rw-r--r--client/src/app/+signup/+register/register.component.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts
index d8ac39c7c..bb7276459 100644
--- a/client/src/app/+signup/+register/register.component.ts
+++ b/client/src/app/+signup/+register/register.component.ts
@@ -42,6 +42,8 @@ export class RegisterComponent implements OnInit {
42 defaultNextStepButtonLabel = $localize`:Button on the registration form to go to the previous step:Next` 42 defaultNextStepButtonLabel = $localize`:Button on the registration form to go to the previous step:Next`
43 stepUserButtonLabel = this.defaultNextStepButtonLabel 43 stepUserButtonLabel = this.defaultNextStepButtonLabel
44 44
45 signupDisabled = false
46
45 private serverConfig: ServerConfig 47 private serverConfig: ServerConfig
46 48
47 constructor ( 49 constructor (
@@ -62,6 +64,11 @@ export class RegisterComponent implements OnInit {
62 ngOnInit (): void { 64 ngOnInit (): void {
63 this.serverConfig = this.route.snapshot.data.serverConfig 65 this.serverConfig = this.route.snapshot.data.serverConfig
64 66
67 if (this.serverConfig.signup.allowed === false || this.serverConfig.signup.allowedForCurrentIP === false) {
68 this.signupDisabled = true
69 return
70 }
71
65 this.videoUploadDisabled = this.serverConfig.user.videoQuota === 0 72 this.videoUploadDisabled = this.serverConfig.user.videoQuota === 0
66 this.stepUserButtonLabel = this.videoUploadDisabled 73 this.stepUserButtonLabel = this.videoUploadDisabled
67 ? $localize`:Button on the registration form to finalize the account and channel creation:Signup` 74 ? $localize`:Button on the registration form to finalize the account and channel creation:Signup`