diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-01-15 12:15:31 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-01-15 12:15:31 +0100 |
commit | 96a4a7c332db933ddd70ed1be5ecf9eae5106637 (patch) | |
tree | fa4f58c78d7dbbad0c2cd53c119c16e36d8ecb8d /client/src/app/+admin/config | |
parent | f8b65c22a9cbf60a1d359c6aa2744baede1ee05f (diff) | |
download | PeerTube-96a4a7c332db933ddd70ed1be5ecf9eae5106637.tar.gz PeerTube-96a4a7c332db933ddd70ed1be5ecf9eae5106637.tar.zst PeerTube-96a4a7c332db933ddd70ed1be5ecf9eae5106637.zip |
Add description for sensitive configuration options, reword others
Diffstat (limited to 'client/src/app/+admin/config')
3 files changed, 55 insertions, 33 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 ac0447d25..f61593677 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 | |||
@@ -165,7 +165,7 @@ | |||
165 | 165 | ||
166 | <div class="form-group"> | 166 | <div class="form-group"> |
167 | <label i18n for="instanceBusinessModel">How will you finance the PeerTube server?</label> | 167 | <label i18n for="instanceBusinessModel">How will you finance the PeerTube server?</label> |
168 | <div class="label-small-info">With you own funds? With users donations? Advertising?</div> | 168 | <div class="label-small-info">With your own funds? With users donations? Advertising?</div> |
169 | 169 | ||
170 | <textarea | 170 | <textarea |
171 | id="instanceBusinessModel" formControlName="businessModel" class="small" | 171 | id="instanceBusinessModel" formControlName="businessModel" class="small" |
@@ -233,23 +233,23 @@ | |||
233 | <my-peertube-checkbox | 233 | <my-peertube-checkbox |
234 | inputName="signupEnabled" formControlName="enabled" | 234 | inputName="signupEnabled" formControlName="enabled" |
235 | i18n-labelText labelText="Signup enabled" | 235 | i18n-labelText labelText="Signup enabled" |
236 | ></my-peertube-checkbox> | ||
237 | </div> | ||
238 | |||
239 | <div class="form-group"> | ||
240 | <my-peertube-checkbox *ngIf="isSignupEnabled()" | ||
241 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | ||
242 | i18n-labelText labelText="Signup requires email verification" | ||
243 | ></my-peertube-checkbox> | ||
244 | </div> | ||
245 | |||
246 | <div *ngIf="isSignupEnabled()" class="form-group"> | ||
247 | <label i18n for="signupLimit">Signup limit</label> | ||
248 | <input | ||
249 | type="text" id="signupLimit" | ||
250 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | ||
251 | > | 236 | > |
252 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | 237 | <ng-container ngProjectAs="extra"> |
238 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" | ||
239 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | ||
240 | i18n-labelText labelText="Signup requires email verification" | ||
241 | ></my-peertube-checkbox> | ||
242 | |||
243 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> | ||
244 | <label i18n for="signupLimit">Signup limit</label> | ||
245 | <input | ||
246 | type="text" id="signupLimit" | ||
247 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | ||
248 | > | ||
249 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | ||
250 | </div> | ||
251 | </ng-container> | ||
252 | </my-peertube-checkbox> | ||
253 | </div> | 253 | </div> |
254 | </ng-container> | 254 | </ng-container> |
255 | 255 | ||
@@ -291,14 +291,14 @@ | |||
291 | <div class="form-group" formGroupName="http"> | 291 | <div class="form-group" formGroupName="http"> |
292 | <my-peertube-checkbox | 292 | <my-peertube-checkbox |
293 | inputName="importVideosHttpEnabled" formControlName="enabled" | 293 | inputName="importVideosHttpEnabled" formControlName="enabled" |
294 | i18n-labelText labelText="Video import with HTTP URL (i.e. YouTube) enabled" | 294 | i18n-labelText labelText="Allow import with HTTP URL (i.e. YouTube)" |
295 | ></my-peertube-checkbox> | 295 | ></my-peertube-checkbox> |
296 | </div> | 296 | </div> |
297 | 297 | ||
298 | <div class="form-group" formGroupName="torrent"> | 298 | <div class="form-group" formGroupName="torrent"> |
299 | <my-peertube-checkbox | 299 | <my-peertube-checkbox |
300 | inputName="importVideosTorrentEnabled" formControlName="enabled" | 300 | inputName="importVideosTorrentEnabled" formControlName="enabled" |
301 | i18n-labelText labelText="Video import with a torrent file or a magnet URI enabled" | 301 | i18n-labelText labelText="Allow import with a torrent file or a magnet URI" |
302 | ></my-peertube-checkbox> | 302 | ></my-peertube-checkbox> |
303 | </div> | 303 | </div> |
304 | 304 | ||
@@ -315,8 +315,12 @@ | |||
315 | <div class="form-group"> | 315 | <div class="form-group"> |
316 | <my-peertube-checkbox | 316 | <my-peertube-checkbox |
317 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" | 317 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" |
318 | i18n-labelText labelText="New videos of users automatically blacklisted enabled" | 318 | i18n-labelText labelText="Blacklist new videos automatically" |
319 | ></my-peertube-checkbox> | 319 | > |
320 | <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> | ||
322 | </ng-container> | ||
323 | </my-peertube-checkbox> | ||
320 | </div> | 324 | </div> |
321 | 325 | ||
322 | </ng-container> | 326 | </ng-container> |
@@ -339,7 +343,7 @@ | |||
339 | <div class="form-group"> | 343 | <div class="form-group"> |
340 | <my-peertube-checkbox | 344 | <my-peertube-checkbox |
341 | inputName="followersInstanceManualApproval" formControlName="manualApproval" | 345 | inputName="followersInstanceManualApproval" formControlName="manualApproval" |
342 | i18n-labelText labelText="Manually approve new instance follower" | 346 | i18n-labelText labelText="Manually approve new instance followers" |
343 | ></my-peertube-checkbox> | 347 | ></my-peertube-checkbox> |
344 | </div> | 348 | </div> |
345 | </ng-container> | 349 | </ng-container> |
@@ -355,7 +359,11 @@ | |||
355 | <my-peertube-checkbox | 359 | <my-peertube-checkbox |
356 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | 360 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" |
357 | i18n-labelText labelText="Automatically follow other instances that follow you" | 361 | i18n-labelText labelText="Automatically follow other instances that follow you" |
358 | ></my-peertube-checkbox> | 362 | > |
363 | <ng-container ngProjectAs="description"> | ||
364 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | ||
365 | </ng-container> | ||
366 | </my-peertube-checkbox> | ||
359 | </div> | 367 | </div> |
360 | </ng-container> | 368 | </ng-container> |
361 | 369 | ||
@@ -363,17 +371,24 @@ | |||
363 | <div class="form-group"> | 371 | <div class="form-group"> |
364 | <my-peertube-checkbox | 372 | <my-peertube-checkbox |
365 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | 373 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" |
366 | i18n-labelText labelText="Automatically follow instance of the public index (below)" | 374 | i18n-labelText labelText="Automatically follow instances of the public index" |
367 | ></my-peertube-checkbox> | 375 | [(ngModel)]="isAutoFollowIndexEnabled" |
368 | </div> | ||
369 | |||
370 | <div class="form-group"> | ||
371 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | ||
372 | <input | ||
373 | type="text" id="followingsInstanceAutoFollowIndexUrl" | ||
374 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | ||
375 | > | 376 | > |
376 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | 377 | <ng-container ngProjectAs="description"> |
378 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | ||
379 | </ng-container> | ||
380 | |||
381 | <ng-container ngProjectAs="extra"> | ||
382 | <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled }"> | ||
383 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | ||
384 | <input | ||
385 | type="text" id="followingsInstanceAutoFollowIndexUrl" | ||
386 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | ||
387 | > | ||
388 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | ||
389 | </div> | ||
390 | </ng-container> | ||
391 | </my-peertube-checkbox> | ||
377 | </div> | 392 | </div> |
378 | 393 | ||
379 | </ng-container> | 394 | </ng-container> |
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 2b4d0da2c..60d608028 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 | |||
@@ -53,3 +53,8 @@ textarea { | |||
53 | font-style: italic; | 53 | font-style: italic; |
54 | margin-bottom: 10px; | 54 | margin-bottom: 10px; |
55 | } | 55 | } |
56 | |||
57 | .disabled-checkbox-extra { | ||
58 | opacity: .5; | ||
59 | pointer-events: none; | ||
60 | } | ||
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 49bb4db0e..1bc907b73 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | |||
@@ -24,6 +24,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
24 | languageItems: SelectItem[] = [] | 24 | languageItems: SelectItem[] = [] |
25 | categoryItems: SelectItem[] = [] | 25 | categoryItems: SelectItem[] = [] |
26 | 26 | ||
27 | isAutoFollowIndexEnabled = false | ||
28 | |||
27 | private serverConfig: ServerConfig | 29 | private serverConfig: ServerConfig |
28 | 30 | ||
29 | constructor ( | 31 | constructor ( |