]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/header/search-typeahead.component.html
Bumped to version v5.2.1
[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="search" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, playlists, channels…"
4 [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keydown)="handleKey($event)"
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" tabindex="0"
18 (mouseenter)="onSuggestionHover(i)" (click)="onSuggestionClicked(result)" (keyup.enter)="onSuggestionClicked(result)"
19 >
20 <my-suggestion [result]="result" [highlight]="search"></my-suggestion>
21 </li>
22 </ul>
23
24 <!-- suggestion help, not shown until one of the suggestions is selected and specific to that suggestion -->
25 <div *ngIf="showSearchGlobalHelp()" id="typeahead-help" class="overflow-hidden">
26 <div class="d-flex justify-content-between">
27 <div class="small-title" i18n>GLOBAL SEARCH</div>
28 <div class="advanced-search-status muted">
29 <span *ngIf="serverConfig" class="me-1" i18n>using {{ serverConfig.search.searchIndex.url }}</span>
30 </div>
31 </div>
32 <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>
33 </div>
34
35 <!-- search instructions, when search input is empty -->
36 <div *ngIf="areInstructionsDisplayed()" id="typeahead-instructions" class="overflow-hidden">
37 <span class="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 <div class="small-title" i18n>ADVANCED SEARCH</div>
40 <div class="advanced-search-status c-help">
41 <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.">
42 <span *ngIf="canSearchAnyURI()" class="me-1" i18n>any instance</span>
43 <span *ngIf="!canSearchAnyURI()" class="me-1" i18n>only followed instances</span>
44 </span>
45 </div>
46 </div>
47 <ul>
48 <li>
49 <em>@channel_id@domain</em> <span class="flex-auto muted" i18n>will list the matching channel</span>
50 </li>
51 <li>
52 <em>URL</em> <span class="muted" i18n>will list the matching channel</span>
53 </li>
54 <li>
55 <em>UUID</em> <span class="muted" i18n>will list the matching video</span>
56 </li>
57 </ul>
58 </div>
59 </div>
60
61 </div>