46b28ed48e3bab272b3e227b752ad76445cd366e
[oweals/peertube.git] / client / src / app / header / search-typeahead.component.html
1 <div class="d-inline-flex position-relative" id="typeahead-container">
2   <input
3     type="text" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, channels…"
4     [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keyup)="handleKeyUp($event)"
5   >
6   <span class="icon icon-search" (click)="doSearch()"></span>
7
8   <div class="position-absolute jump-to-suggestions">
9     <!-- suggestions -->
10     <my-suggestions *ngIf="search && newSearch" [results]="results" [highlight]="search" (init)="initKeyboardEventsManager($event)"></my-suggestions>
11
12     <!-- suggestion help, not shown until one of the suggestions is selected and specific to that suggestion -->
13     <div *ngIf="showHelp" id="typeahead-help" class="overflow-hidden">
14       <ng-container *ngIf="activeResult.type === 'search-global'">
15         <div class="d-flex justify-content-between">
16           <label class="small-title" i18n>GLOBAL SEARCH</label>
17           <div class="advanced-search-status text-muted">
18             <span *ngIf="serverConfig" class="mr-1" i18n>using {{ serverConfig.followings.instance.autoFollowIndex.indexUrl }}</span>
19             <i class="glyphicon glyphicon-globe"></i>
20           </div>
21         </div>
22         <div class="text-muted" i18n>Results will be augmented with those of a third-party index. Only data necessary to make the query will be sent.</div>
23       </ng-container>
24     </div>
25
26     <!-- search instructions, when search input is empty -->
27     <div *ngIf="areInstructionsDisplayed" id="typeahead-instructions" class="overflow-hidden">
28       <div class="d-flex justify-content-between">
29         <label class="small-title" i18n>ADVANCED SEARCH</label>
30         <div class="advanced-search-status c-help">
31           <span [ngClass]="canSearchAnyURI ? 'text-success' : 'text-muted'" i18n-title title="Determines whether you can resolve any distant content, or if this instance only allows doing so for instances it follows.">
32             <span *ngIf="canSearchAnyURI" class="mr-1" i18n>any instance</span>
33             <span *ngIf="!canSearchAnyURI" class="mr-1" i18n>only followed instances</span>
34             <i [ngClass]="canSearchAnyURI ? 'glyphicon glyphicon-ok-sign' : 'glyphicon glyphicon-exclamation-sign'"></i>
35           </span>
36         </div>
37       </div>
38       <ul>
39         <li>
40           <em>@channel_id@domain</em> <span class="flex-auto text-muted" i18n>channel</span>
41         </li>
42         <li>
43           <em>URL</em> <span class="text-muted" i18n>channel</span>
44         </li>
45         <li>
46           <em>UUID</em> <span class="text-muted" i18n>video</span>
47         </li>
48       </ul>
49       <span class="text-muted" i18n>Any other text will return matching video or channel names.</span>
50     </div>
51   </div>
52
53 </div>