]>
Commit | Line | Data |
---|---|---|
9b8a7aa8 RK |
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…" | |
5fb2e288 C |
4 | [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keydown)="handleKey($event)" (keydown.enter)="doSearch()" |
5 | aria-label="Search" autocomplete="off" | |
9b8a7aa8 | 6 | > |
1916c966 C |
7 | <my-global-icon |
8 | title="Search" i18n-title role="button" | |
9 | iconName="search" class="icon icon-search" (click)="doSearch()" (keydown.enter)="doSearch()" | |
10 | ></my-global-icon> | |
f409f0c3 RK |
11 | |
12 | <div class="position-absolute jump-to-suggestions"> | |
5fb2e288 C |
13 | |
14 | <ul [hidden]="!search || !areSuggestionsOpened" role="listbox" class="p-0 m-0"> | |
15 | <li | |
16 | *ngFor="let result of results; let i = index" class="suggestion d-flex flex-justify-start flex-items-center p-0 f5" | |
17 | role="option" aria-selected="true" (mouseenter)="onSuggestionHover(i)" (click)="onSuggestionlicked(result)" | |
18 | > | |
19 | <my-suggestion [result]="result" [highlight]="search"></my-suggestion> | |
20 | </li> | |
21 | </ul> | |
6af662a5 RK |
22 | |
23 | <!-- suggestion help, not shown until one of the suggestions is selected and specific to that suggestion --> | |
5fb2e288 C |
24 | <div *ngIf="showSearchGlobalHelp()" id="typeahead-help" class="overflow-hidden"> |
25 | <div class="d-flex justify-content-between"> | |
26 | <label class="small-title" i18n>GLOBAL SEARCH</label> | |
27 | <div class="advanced-search-status text-muted"> | |
28 | <span *ngIf="serverConfig" class="mr-1" i18n>using {{ serverConfig.search.searchIndex.url }}</span> | |
29 | <i class="glyphicon glyphicon-globe"></i> | |
6af662a5 | 30 | </div> |
5fb2e288 C |
31 | </div> |
32 | <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> | |
6af662a5 | 33 | </div> |
f409f0c3 RK |
34 | |
35 | <!-- search instructions, when search input is empty --> | |
5fb2e288 | 36 | <div *ngIf="areInstructionsDisplayed()" id="typeahead-instructions" class="overflow-hidden"> |
a3caabe2 RK |
37 | <span class="text-muted" i18n>Your query will be matched against video names or descriptions, channel names.</span> |
38 | <div class="d-flex justify-content-between mt-3"> | |
14571f19 | 39 | <label class="small-title" i18n>ADVANCED SEARCH</label> |
6af662a5 | 40 | <div class="advanced-search-status c-help"> |
8a979d73 | 41 | <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."> |
5fb2e288 C |
42 | <span *ngIf="canSearchAnyURI()" class="mr-1" i18n>any instance</span> |
43 | <span *ngIf="!canSearchAnyURI()" class="mr-1" i18n>only followed instances</span> | |
44 | <i [ngClass]="canSearchAnyURI() ? 'glyphicon glyphicon-ok-sign' : 'glyphicon glyphicon-exclamation-sign'"></i> | |
f409f0c3 RK |
45 | </span> |
46 | </div> | |
47 | </div> | |
48 | <ul> | |
49 | <li> | |
e6dfa586 | 50 | <em>@channel_id@domain</em> <span class="flex-auto text-muted" i18n>will list the matching channel</span> |
f409f0c3 RK |
51 | </li> |
52 | <li> | |
e6dfa586 | 53 | <em>URL</em> <span class="text-muted" i18n>will list the matching channel</span> |
f409f0c3 RK |
54 | </li> |
55 | <li> | |
e6dfa586 | 56 | <em>UUID</em> <span class="text-muted" i18n>will list the matching video</span> |
f409f0c3 RK |
57 | </li> |
58 | </ul> | |
f409f0c3 RK |
59 | </div> |
60 | </div> | |
61 | ||
62 | </div> |