aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html84
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss6
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts16
3 files changed, 102 insertions, 4 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 4ee573696..b8682ffe0 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
@@ -396,9 +396,9 @@
396 </div> 396 </div>
397 </div> 397 </div>
398 398
399 <div class="form-row mt-4"> <!-- new videos grid --> 399 <div class="form-row mt-4"> <!-- videos grid -->
400 <div class="form-group col-12 col-lg-4 col-xl-3"> 400 <div class="form-group col-12 col-lg-4 col-xl-3">
401 <div i18n class="inner-form-title">NEW VIDEOS</div> 401 <div i18n class="inner-form-title">VIDEOS</div>
402 </div> 402 </div>
403 403
404 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> 404 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
@@ -445,6 +445,86 @@
445 </div> 445 </div>
446 </div> 446 </div>
447 447
448 <div class="form-row mt-4"> <!-- search grid -->
449 <div class="form-group col-12 col-lg-4 col-xl-3">
450 <div i18n class="inner-form-title">SEARCH</div>
451 </div>
452
453 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
454
455 <ng-container formGroupName="search">
456 <ng-container formGroupName="remoteUri">
457
458 <div class="form-group">
459 <my-peertube-checkbox
460 inputName="searchRemoteUriUsers" formControlName="users"
461 i18n-labelText labelText="Allow users to do remote URI/handle search"
462 >
463 <ng-container ngProjectAs="description">
464 <span i18n>Add ability for <strong>your users</strong> to fetch remote videos/actors by their URI, that may not be federated with your instance</span>
465 </ng-container>
466 </my-peertube-checkbox>
467 </div>
468
469 <div class="form-group">
470 <my-peertube-checkbox
471 inputName="searchRemoteUriAnonymous" formControlName="anonymous"
472 i18n-labelText labelText="Allow anonymous to do remote URI/handle search"
473 >
474 <ng-container ngProjectAs="description">
475 <span i18n>Add ability for <strong>anonymous</strong> to fetch remote videos/actors by their URI, that may not be federated with your instance</span>
476 </ng-container>
477 </my-peertube-checkbox>
478 </div>
479
480 </ng-container>
481
482 <ng-container formGroupName="searchIndex">
483 <div class="form-group">
484 <my-peertube-checkbox
485 inputName="searchIndexEnabled" formControlName="enabled"
486 i18n-labelText labelText="Enable search index"
487 >
488
489 <ng-container ngProjectAs="extra">
490 <div [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }">
491 <label i18n for="searchIndexUrl">Search index URL</label>
492 <input
493 type="text" id="searchIndexUrl" class="form-control"
494 formControlName="url" [ngClass]="{ 'input-error': formErrors['search.searchIndex.url'] }"
495 >
496 <div *ngIf="formErrors.search.searchIndex.url" class="form-error">{{ formErrors.search.searchIndex.url }}</div>
497 </div>
498
499 <div class="mt-3">
500 <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }"
501 inputName="searchIndexDisableLocalSearch" formControlName="disableLocalSearch"
502 i18n-labelText labelText="Disable local search"
503 ></my-peertube-checkbox>
504 </div>
505
506 <div class="mt-3">
507 <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }"
508 inputName="searchIndexIsDefaultSearch" formControlName="isDefaultSearch"
509 i18n-labelText labelText="Set search index as default"
510 >
511 <ng-container ngProjectAs="description">
512 <span i18n>The local search is used by default</span>
513 </ng-container>
514 </my-peertube-checkbox>
515 </div>
516
517 </ng-container>
518 </my-peertube-checkbox>
519 </div>
520
521 </ng-container>
522
523 </ng-container>
524
525 </div>
526 </div>
527
448 <div class="form-row mt-4"> <!-- federation grid --> 528 <div class="form-row mt-4"> <!-- federation grid -->
449 <div class="form-group col-12 col-lg-4 col-xl-3"> 529 <div class="form-group col-12 col-lg-4 col-xl-3">
450 <div i18n class="inner-form-title">FEDERATION</div> 530 <div i18n class="inner-form-title">FEDERATION</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 2bfa92da4..9618100b5 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
@@ -64,8 +64,10 @@ textarea {
64} 64}
65 65
66.disabled-checkbox-extra { 66.disabled-checkbox-extra {
67 opacity: .5; 67 &, ::ng-deep label {
68 pointer-events: none; 68 opacity: .5;
69 pointer-events: none;
70 }
69} 71}
70 72
71.form-group-right { 73.form-group-right {
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 6d59494c8..3a47ba25e 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
@@ -221,6 +221,18 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
221 level: null, 221 level: null,
222 dismissable: null, 222 dismissable: null,
223 message: null 223 message: null
224 },
225 search: {
226 remoteUri: {
227 users: null,
228 anonymous: null
229 },
230 searchIndex: {
231 enabled: null,
232 url: this.customConfigValidatorsService.SEARCH_INDEX_URL,
233 disableLocalSearch: null,
234 isDefaultSearch: null
235 }
224 } 236 }
225 } 237 }
226 238
@@ -254,6 +266,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
254 return this.form.value['signup']['enabled'] === true 266 return this.form.value['signup']['enabled'] === true
255 } 267 }
256 268
269 isSearchIndexEnabled () {
270 return this.form.value['search']['searchIndex']['enabled'] === true
271 }
272
257 isAutoFollowIndexEnabled () { 273 isAutoFollowIndexEnabled () {
258 return this.form.value['followings']['instance']['autoFollowIndex']['enabled'] === true 274 return this.form.value['followings']['instance']['autoFollowIndex']['enabled'] === true
259 } 275 }