diff options
Diffstat (limited to 'client/src/app')
3 files changed, 12 insertions, 3 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 915d60090..d806ea355 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html | |||
@@ -234,6 +234,9 @@ | |||
234 | inputName="signupEnabled" formControlName="enabled" | 234 | inputName="signupEnabled" formControlName="enabled" |
235 | i18n-labelText labelText="Signup enabled" | 235 | i18n-labelText labelText="Signup enabled" |
236 | > | 236 | > |
237 | <ng-container ngProjectAs="description"> | ||
238 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | ||
239 | </ng-container> | ||
237 | <ng-container ngProjectAs="extra"> | 240 | <ng-container ngProjectAs="extra"> |
238 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" | 241 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" |
239 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | 242 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" |
@@ -243,10 +246,11 @@ | |||
243 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> | 246 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> |
244 | <label i18n for="signupLimit">Signup limit</label> | 247 | <label i18n for="signupLimit">Signup limit</label> |
245 | <input | 248 | <input |
246 | type="text" id="signupLimit" | 249 | type="number" min="-1" id="signupLimit" |
247 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | 250 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" |
248 | > | 251 | > |
249 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | 252 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> |
253 | <small *ngIf="form.value['signup']['limit'] === -1" class="text-muted">Signup won't be limited to a fixed number of users.</small> | ||
250 | </div> | 254 | </div> |
251 | </ng-container> | 255 | </ng-container> |
252 | </my-peertube-checkbox> | 256 | </my-peertube-checkbox> |
@@ -318,7 +322,7 @@ | |||
318 | i18n-labelText labelText="Blacklist new videos automatically" | 322 | i18n-labelText labelText="Blacklist new videos automatically" |
319 | > | 323 | > |
320 | <ng-container ngProjectAs="description"> | 324 | <ng-container ngProjectAs="description"> |
321 | <span i18n>Videos of regular users will stay private until a moderator reviews them. Can be overriden per user.</span> | 325 | <span i18n>Unless a user is marked as trusted, their videos will stay private until a moderator reviews them.</span> |
322 | </ng-container> | 326 | </ng-container> |
323 | </my-peertube-checkbox> | 327 | </my-peertube-checkbox> |
324 | </div> | 328 | </div> |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss index 60d608028..dd70f1c06 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss | |||
@@ -10,6 +10,11 @@ input[type=text] { | |||
10 | display: block; | 10 | display: block; |
11 | } | 11 | } |
12 | 12 | ||
13 | input[type=number] { | ||
14 | @include peertube-input-text(315px); | ||
15 | display: block; | ||
16 | } | ||
17 | |||
13 | input[type=checkbox] { | 18 | input[type=checkbox] { |
14 | @include peertube-checkbox(1px); | 19 | @include peertube-checkbox(1px); |
15 | } | 20 | } |
diff --git a/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts b/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts index 767e3f026..d20754d11 100644 --- a/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts +++ b/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts | |||
@@ -56,7 +56,7 @@ export class CustomConfigValidatorsService { | |||
56 | } | 56 | } |
57 | 57 | ||
58 | this.SIGNUP_LIMIT = { | 58 | this.SIGNUP_LIMIT = { |
59 | VALIDATORS: [ Validators.required, Validators.min(1), Validators.pattern('[0-9]+') ], | 59 | VALIDATORS: [ Validators.required, Validators.min(-1), Validators.pattern('-?[0-9]+') ], |
60 | MESSAGES: { | 60 | MESSAGES: { |
61 | 'required': this.i18n('Signup limit is required.'), | 61 | 'required': this.i18n('Signup limit is required.'), |
62 | 'min': this.i18n('Signup limit must be greater than 1.'), | 62 | 'min': this.i18n('Signup limit must be greater than 1.'), |