]>
Commit | Line | Data |
---|---|---|
9b8a7aa8 RK |
1 | <div class="d-inline-flex position-relative" id="typeahead-container"> |
2 | <input | |
5bd427e0 C |
3 | type="search" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, playlists, channels…" |
4 | [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keydown)="handleKey($event)" | |
5fb2e288 | 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" | |
5bd427e0 | 17 | role="option" aria-selected="true" (mouseenter)="onSuggestionHover(i)" (click)="onSuggestionClicked(result)" |
5fb2e288 C |
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> | |
b788e691 | 27 | <div class="advanced-search-status muted"> |
4c8749cb | 28 | <span *ngIf="serverConfig" class="me-1" i18n>using {{ serverConfig.search.searchIndex.url }}</span> |
6af662a5 | 29 | </div> |
5fb2e288 | 30 | </div> |
b788e691 | 31 | <div class="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 | 32 | </div> |
f409f0c3 RK |
33 | |
34 | <!-- search instructions, when search input is empty --> | |
5fb2e288 | 35 | <div *ngIf="areInstructionsDisplayed()" id="typeahead-instructions" class="overflow-hidden"> |
b788e691 | 36 | <span class="muted" i18n>Your query will be matched against video names or descriptions, channel names.</span> |
a3caabe2 | 37 | <div class="d-flex justify-content-between mt-3"> |
14571f19 | 38 | <label class="small-title" i18n>ADVANCED SEARCH</label> |
6af662a5 | 39 | <div class="advanced-search-status c-help"> |
b788e691 | 40 | <span [ngClass]="canSearchAnyURI ? 'text-success' : 'muted'" i18n-title title="Determines whether you can resolve any distant content, or if this instance only allows doing so for instances it follows."> |
4c8749cb C |
41 | <span *ngIf="canSearchAnyURI()" class="me-1" i18n>any instance</span> |
42 | <span *ngIf="!canSearchAnyURI()" class="me-1" i18n>only followed instances</span> | |
f409f0c3 RK |
43 | </span> |
44 | </div> | |
45 | </div> | |
46 | <ul> | |
47 | <li> | |
b788e691 | 48 | <em>@channel_id@domain</em> <span class="flex-auto muted" i18n>will list the matching channel</span> |
f409f0c3 RK |
49 | </li> |
50 | <li> | |
b788e691 | 51 | <em>URL</em> <span class="muted" i18n>will list the matching channel</span> |
f409f0c3 RK |
52 | </li> |
53 | <li> | |
b788e691 | 54 | <em>UUID</em> <span class="muted" i18n>will list the matching video</span> |
f409f0c3 RK |
55 | </li> |
56 | </ul> | |
f409f0c3 RK |
57 | </div> |
58 | </div> | |
59 | ||
60 | </div> |