aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/config')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html35
-rw-r--r--client/src/app/+admin/config/shared/config.service.ts12
2 files changed, 26 insertions, 21 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 4ce4c18fc..b925d3d02 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
@@ -108,6 +108,7 @@
108 108
109 <div class="peertube-select-container"> 109 <div class="peertube-select-container">
110 <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy" class="form-control"> 110 <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy" class="form-control">
111 <option i18n value="undefined" disabled>Policy for sensitive videos</option>
111 <option i18n value="do_not_list">Do not list</option> 112 <option i18n value="do_not_list">Do not list</option>
112 <option i18n value="blur">Blur thumbnails</option> 113 <option i18n value="blur">Blur thumbnails</option>
113 <option i18n value="display">Display</option> 114 <option i18n value="display">Display</option>
@@ -319,7 +320,7 @@
319 <label i18n for="userVideoQuota">Default video quota per user</label> 320 <label i18n for="userVideoQuota">Default video quota per user</label>
320 <div class="peertube-select-container"> 321 <div class="peertube-select-container">
321 <select id="userVideoQuota" formControlName="videoQuota" class="form-control"> 322 <select id="userVideoQuota" formControlName="videoQuota" class="form-control">
322 <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> 323 <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value" [disabled]="videoQuotaOption.disabled">
323 {{ videoQuotaOption.label }} 324 {{ videoQuotaOption.label }}
324 </option> 325 </option>
325 </select> 326 </select>
@@ -331,7 +332,7 @@
331 <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label> 332 <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label>
332 <div class="peertube-select-container"> 333 <div class="peertube-select-container">
333 <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily" class="form-control"> 334 <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily" class="form-control">
334 <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> 335 <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value" [disabled]="videoQuotaDailyOption.disabled">
335 {{ videoQuotaDailyOption.label }} 336 {{ videoQuotaDailyOption.label }}
336 </option> 337 </option>
337 </select> 338 </select>
@@ -441,10 +442,14 @@
441 <div class="form-group"> 442 <div class="form-group">
442 <my-peertube-checkbox 443 <my-peertube-checkbox
443 inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" 444 inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled"
444 i18n-labelText labelText="Automatically follow instances of the public index" 445 i18n-labelText labelText="Automatically follow instances of a public index"
445 > 446 >
446 <ng-container ngProjectAs="description"> 447 <ng-container ngProjectAs="description">
447 <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> 448 <p i18n>⚠️ This functionality requires a lot of attention and extra moderation.</p>
449
450 <span i18n>
451 You should only follow indexes you trust, or <a href="https://framagit.org/framasoft/peertube/instances-peertube#peertube-auto-follow">host your own</a>.
452 </span>
448 </ng-container> 453 </ng-container>
449 454
450 <ng-container ngProjectAs="extra"> 455 <ng-container ngProjectAs="extra">
@@ -651,20 +656,16 @@
651 </my-peertube-checkbox> 656 </my-peertube-checkbox>
652 </div> 657 </div>
653 658
654 <div class="form-group"> 659 <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }">
655 660 <label i18n for="transcodingThreads">Transcoding threads</label>
656 <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> 661 <div class="peertube-select-container">
657 <label i18n for="transcodingThreads">Transcoding threads</label> 662 <select id="transcodingThreads" formControlName="threads" class="form-control">
658 <div class="peertube-select-container"> 663 <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value">
659 <select id="transcodingThreads" formControlName="threads" class="form-control"> 664 {{ transcodingThreadOption.label }}
660 <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> 665 </option>
661 {{ transcodingThreadOption.label }} 666 </select>
662 </option>
663 </select>
664 </div>
665 <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div>
666 </div> 667 </div>
667 668 <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div>
668 </div> 669 </div>
669 670
670 <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> 671 <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }">
diff --git a/client/src/app/+admin/config/shared/config.service.ts b/client/src/app/+admin/config/shared/config.service.ts
index 28a3d67d6..874b8094d 100644
--- a/client/src/app/+admin/config/shared/config.service.ts
+++ b/client/src/app/+admin/config/shared/config.service.ts
@@ -10,8 +10,8 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
10export class ConfigService { 10export class ConfigService {
11 private static BASE_APPLICATION_URL = environment.apiUrl + '/api/v1/config' 11 private static BASE_APPLICATION_URL = environment.apiUrl + '/api/v1/config'
12 12
13 videoQuotaOptions: { value: number, label: string }[] = [] 13 videoQuotaOptions: { value: number, label: string, disabled?: boolean }[] = []
14 videoQuotaDailyOptions: { value: number, label: string }[] = [] 14 videoQuotaDailyOptions: { value: number, label: string, disabled?: boolean }[] = []
15 15
16 constructor ( 16 constructor (
17 private authHttp: HttpClient, 17 private authHttp: HttpClient,
@@ -19,8 +19,10 @@ export class ConfigService {
19 private i18n: I18n 19 private i18n: I18n
20 ) { 20 ) {
21 this.videoQuotaOptions = [ 21 this.videoQuotaOptions = [
22 { value: undefined, label: 'Default quota', disabled: true },
22 { value: -1, label: this.i18n('Unlimited') }, 23 { value: -1, label: this.i18n('Unlimited') },
23 { value: 0, label: '0' }, 24 { value: undefined, label: '─────', disabled: true },
25 { value: 0, label: this.i18n('None - no upload possible') },
24 { value: 100 * 1024 * 1024, label: this.i18n('100MB') }, 26 { value: 100 * 1024 * 1024, label: this.i18n('100MB') },
25 { value: 500 * 1024 * 1024, label: this.i18n('500MB') }, 27 { value: 500 * 1024 * 1024, label: this.i18n('500MB') },
26 { value: 1024 * 1024 * 1024, label: this.i18n('1GB') }, 28 { value: 1024 * 1024 * 1024, label: this.i18n('1GB') },
@@ -30,8 +32,10 @@ export class ConfigService {
30 ] 32 ]
31 33
32 this.videoQuotaDailyOptions = [ 34 this.videoQuotaDailyOptions = [
35 { value: undefined, label: 'Default daily upload limit', disabled: true },
33 { value: -1, label: this.i18n('Unlimited') }, 36 { value: -1, label: this.i18n('Unlimited') },
34 { value: 0, label: '0' }, 37 { value: undefined, label: '─────', disabled: true },
38 { value: 0, label: this.i18n('None - no upload possible') },
35 { value: 10 * 1024 * 1024, label: this.i18n('10MB') }, 39 { value: 10 * 1024 * 1024, label: this.i18n('10MB') },
36 { value: 50 * 1024 * 1024, label: this.i18n('50MB') }, 40 { value: 50 * 1024 * 1024, label: this.i18n('50MB') },
37 { value: 100 * 1024 * 1024, label: this.i18n('100MB') }, 41 { value: 100 * 1024 * 1024, label: this.i18n('100MB') },