]>
Commit | Line | Data |
---|---|---|
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, playlists, channels…" | |
4 | [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keydown)="handleKey($event)" (keydown.enter)="doSearch()" | |
5 | aria-label="Search" autocomplete="off" | |
6 | > | |
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> | |
11 | ||
12 | <div class="position-absolute jump-to-suggestions"> | |
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> | |
22 | ||
23 | <!-- suggestion help, not shown until one of the suggestions is selected and specific to that suggestion --> | |
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> | |
30 | </div> | |
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> | |
33 | </div> | |
34 | ||
35 | <!-- search instructions, when search input is empty --> | |
36 | <div *ngIf="areInstructionsDisplayed()" id="typeahead-instructions" class="overflow-hidden"> | |
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"> | |
39 | <label class="small-title" i18n>ADVANCED SEARCH</label> | |
40 | <div class="advanced-search-status c-help"> | |
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."> | |
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> | |
45 | </span> | |
46 | </div> | |
47 | </div> | |
48 | <ul> | |
49 | <li> | |
50 | <em>@channel_id@domain</em> <span class="flex-auto text-muted" i18n>will list the matching channel</span> | |
51 | </li> | |
52 | <li> | |
53 | <em>URL</em> <span class="text-muted" i18n>will list the matching channel</span> | |
54 | </li> | |
55 | <li> | |
56 | <em>UUID</em> <span class="text-muted" i18n>will list the matching video</span> | |
57 | </li> | |
58 | </ul> | |
59 | </div> | |
60 | </div> | |
61 | ||
62 | </div> |