+ <div class="form-row mt-4"> <!-- search grid -->
+ <div class="form-group col-12 col-lg-4 col-xl-3">
+ <div i18n class="inner-form-title">SEARCH</div>
+ </div>
+
+ <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
+
+ <ng-container formGroupName="search">
+ <ng-container formGroupName="remoteUri">
+
+ <div class="form-group">
+ <my-peertube-checkbox
+ inputName="searchRemoteUriUsers" formControlName="users"
+ i18n-labelText labelText="Allow users to do remote URI/handle search"
+ >
+ <ng-container ngProjectAs="description">
+ <span i18n>Allow <strong>your users</strong> to look up remote videos/actors that may not be federated with your instance</span>
+ </ng-container>
+ </my-peertube-checkbox>
+ </div>
+
+ <div class="form-group">
+ <my-peertube-checkbox
+ inputName="searchRemoteUriAnonymous" formControlName="anonymous"
+ i18n-labelText labelText="Allow anonymous to do remote URI/handle search"
+ >
+ <ng-container ngProjectAs="description">
+ <span i18n>Allow <strong>anonymous users</strong> to look up remote videos/actors that may not be federated with your instance</span>
+ </ng-container>
+ </my-peertube-checkbox>
+ </div>
+
+ </ng-container>
+
+ <ng-container formGroupName="searchIndex">
+ <div class="form-group">
+ <my-peertube-checkbox
+ inputName="searchIndexEnabled" formControlName="enabled"
+ i18n-labelText labelText="Enable global search"
+ >
+ <ng-container ngProjectAs="description">
+ <p i18n>⚠️ This functionality depends heavily on the moderation of instances followed by the search index you select.</p>
+
+ <span i18n>
+ You should only use moderated search indexes in production, or <a href="https://framagit.org/framasoft/peertube/search-index">host your own</a>.
+ </span>
+ </ng-container>
+
+ <ng-container ngProjectAs="extra">
+ <div [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }">
+ <label i18n for="searchIndexUrl">Search index URL</label>
+ <input
+ type="text" id="searchIndexUrl" class="form-control"
+ formControlName="url" [ngClass]="{ 'input-error': formErrors['search.searchIndex.url'] }"
+ >
+ <div *ngIf="formErrors.search.searchIndex.url" class="form-error">{{ formErrors.search.searchIndex.url }}</div>
+ </div>
+
+ <div class="mt-3">
+ <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }"
+ inputName="searchIndexDisableLocalSearch" formControlName="disableLocalSearch"
+ i18n-labelText labelText="Disable local search in search bar"
+ ></my-peertube-checkbox>
+ </div>
+
+ <div class="mt-3">
+ <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }"
+ inputName="searchIndexIsDefaultSearch" formControlName="isDefaultSearch"
+ i18n-labelText labelText="Search bar uses the global search index by default"
+ >
+ <ng-container ngProjectAs="description">
+ <span i18n>Otherwise the local search stays used by default</span>
+ </ng-container>
+ </my-peertube-checkbox>
+ </div>
+
+ </ng-container>
+ </my-peertube-checkbox>
+ </div>
+
+ </ng-container>
+
+ </ng-container>
+
+ </div>