]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/header/search-typeahead.component.html
space optimizations for `node_modules` and client stats removal
[github/Chocobozzz/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)="handleKey($event)" (keydown.enter)="doSearch()"
5 aria-label="Search"
6 >
7 <span class="icon icon-search" (click)="doSearch()"></span>
8
9 <div class="position-absolute jump-to-suggestions">
10 <!-- suggestions -->
11 <my-suggestions *ngIf="search && newSearch" [results]="results" [highlight]="search" (init)="initKeyboardEventsManager($event)"></my-suggestions>
12
13 <!-- suggestion help, not shown until one of the suggestions is selected and specific to that suggestion -->
14 <div *ngIf="showHelp" id="typeahead-help" class="overflow-hidden">
15 <ng-container *ngIf="activeResult.type === 'search-global'">
16 <div class="d-flex justify-content-between">
17 <label class="small-title" i18n>GLOBAL SEARCH</label>
18 <div class="advanced-search-status text-muted">
19 <span *ngIf="serverConfig" class="mr-1" i18n>using {{ serverConfig.followings.instance.autoFollowIndex.indexUrl }}</span>
20 <i class="glyphicon glyphicon-globe"></i>
21 </div>
22 </div>
23 <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>
24 </ng-container>
25 </div>
26
27 <!-- search instructions, when search input is empty -->
28 <div *ngIf="areInstructionsDisplayed" id="typeahead-instructions" class="overflow-hidden">
29 <div class="d-flex justify-content-between">
30 <label class="small-title" i18n>ADVANCED SEARCH</label>
31 <div class="advanced-search-status c-help">
32 <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.">
33 <span *ngIf="canSearchAnyURI" class="mr-1" i18n>any instance</span>
34 <span *ngIf="!canSearchAnyURI" class="mr-1" i18n>only followed instances</span>
35 <i [ngClass]="canSearchAnyURI ? 'glyphicon glyphicon-ok-sign' : 'glyphicon glyphicon-exclamation-sign'"></i>
36 </span>
37 </div>
38 </div>
39 <ul>
40 <li>
41 <em>@channel_id@domain</em> <span class="flex-auto text-muted" i18n>will list the matching channel</span>
42 </li>
43 <li>
44 <em>URL</em> <span class="text-muted" i18n>will list the matching channel</span>
45 </li>
46 <li>
47 <em>UUID</em> <span class="text-muted" i18n>will list the matching video</span>
48 </li>
49 </ul>
50 <span class="text-muted" i18n>Any other input will return matching video or channel names.</span>
51 </div>
52 </div>
53
54 </div>