Add message if registration is disabled
This commit is contained in:
parent
db581cf7b9
commit
bd898dd76b
|
@ -1,5 +1,10 @@
|
||||||
<div class="margin-content">
|
<div class="margin-content">
|
||||||
|
|
||||||
|
<div class="signup-disabled" *ngIf="signupDisabled">
|
||||||
|
<div class="alert alert-warning" i18n>Signup is not enabled on this instance.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ng-container *ngIf="!signupDisabled">
|
||||||
<div i18n class="title-page title-page-single">
|
<div i18n class="title-page title-page-single">
|
||||||
Create an account
|
Create an account
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,5 +57,6 @@
|
||||||
</my-custom-stepper>
|
</my-custom-stepper>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.signup-disabled {
|
||||||
|
padding-top: 30vh;
|
||||||
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
@ -42,6 +42,8 @@ export class RegisterComponent implements OnInit {
|
||||||
defaultNextStepButtonLabel = $localize`:Button on the registration form to go to the previous step:Next`
|
defaultNextStepButtonLabel = $localize`:Button on the registration form to go to the previous step:Next`
|
||||||
stepUserButtonLabel = this.defaultNextStepButtonLabel
|
stepUserButtonLabel = this.defaultNextStepButtonLabel
|
||||||
|
|
||||||
|
signupDisabled = false
|
||||||
|
|
||||||
private serverConfig: ServerConfig
|
private serverConfig: ServerConfig
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
|
@ -62,6 +64,11 @@ export class RegisterComponent implements OnInit {
|
||||||
ngOnInit (): void {
|
ngOnInit (): void {
|
||||||
this.serverConfig = this.route.snapshot.data.serverConfig
|
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.videoUploadDisabled = this.serverConfig.user.videoQuota === 0
|
||||||
this.stepUserButtonLabel = this.videoUploadDisabled
|
this.stepUserButtonLabel = this.videoUploadDisabled
|
||||||
? $localize`:Button on the registration form to finalize the account and channel creation:Signup`
|
? $localize`:Button on the registration form to finalize the account and channel creation:Signup`
|
||||||
|
|
Loading…
Reference in New Issue