aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-31 00:59:41 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-01-31 08:56:20 +0100
commite40afb5bc486ff2ce1e5f0a21df7e4e32c344b47 (patch)
tree5def69c06e9bb0b0f9f5fbdbfe5afb1a4918f47c /client/src/app/+admin/config
parent43482ec712d4298e18e4c7642d115ed78a345681 (diff)
downloadPeerTube-e40afb5bc486ff2ce1e5f0a21df7e4e32c344b47.tar.gz
PeerTube-e40afb5bc486ff2ce1e5f0a21df7e4e32c344b47.tar.zst
PeerTube-e40afb5bc486ff2ce1e5f0a21df7e4e32c344b47.zip
Fix signup limit validator, and add warning message.
Diffstat (limited to 'client/src/app/+admin/config')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html8
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss5
2 files changed, 11 insertions, 2 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
13input[type=number] {
14 @include peertube-input-text(315px);
15 display: block;
16}
17
13input[type=checkbox] { 18input[type=checkbox] {
14 @include peertube-checkbox(1px); 19 @include peertube-checkbox(1px);
15} 20}