]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+signup/+register/register.component.ts
Improve advanced input filter
[github/Chocobozzz/PeerTube.git] / client / src / app / +signup / +register / register.component.ts
index d8ac39c7c6b158642fd812fc78abea56d0700c04..bb727645902a0cf8cab267fe602693e8798b4bee 100644 (file)
@@ -42,6 +42,8 @@ export class RegisterComponent implements OnInit {
   defaultNextStepButtonLabel = $localize`:Button on the registration form to go to the previous step:Next`
   stepUserButtonLabel = this.defaultNextStepButtonLabel
 
+  signupDisabled = false
+
   private serverConfig: ServerConfig
 
   constructor (
@@ -62,6 +64,11 @@ export class RegisterComponent implements OnInit {
   ngOnInit (): void {
     this.serverConfig = this.route.snapshot.data.serverConfig
 
+    if (this.serverConfig.signup.allowed === false || this.serverConfig.signup.allowedForCurrentIP === false) {
+      this.signupDisabled = true
+      return
+    }
+
     this.videoUploadDisabled = this.serverConfig.user.videoQuota === 0
     this.stepUserButtonLabel = this.videoUploadDisabled
       ? $localize`:Button on the registration form to finalize the account and channel creation:Signup`