61 lines
2.9 KiB
HTML
61 lines
2.9 KiB
HTML
<div class="d-inline-flex position-relative" id="typeahead-container">
|
|
<input
|
|
type="search" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, playlists, channels…"
|
|
[(ngModel)]="search" (ngModelChange)="onSearchChange()" (keydown)="handleKey($event)"
|
|
aria-label="Search" autocomplete="off"
|
|
>
|
|
<my-global-icon
|
|
title="Search" i18n-title role="button"
|
|
iconName="search" class="icon icon-search" (click)="doSearch()" (keydown.enter)="doSearch()"
|
|
></my-global-icon>
|
|
|
|
<div class="position-absolute jump-to-suggestions">
|
|
|
|
<ul [hidden]="!search || !areSuggestionsOpened" role="listbox" class="p-0 m-0">
|
|
<li
|
|
*ngFor="let result of results; let i = index" class="suggestion d-flex flex-justify-start flex-items-center p-0 f5"
|
|
role="option" aria-selected="true" (mouseenter)="onSuggestionHover(i)" (click)="onSuggestionClicked(result)"
|
|
>
|
|
<my-suggestion [result]="result" [highlight]="search"></my-suggestion>
|
|
</li>
|
|
</ul>
|
|
|
|
<!-- suggestion help, not shown until one of the suggestions is selected and specific to that suggestion -->
|
|
<div *ngIf="showSearchGlobalHelp()" id="typeahead-help" class="overflow-hidden">
|
|
<div class="d-flex justify-content-between">
|
|
<label class="small-title" i18n>GLOBAL SEARCH</label>
|
|
<div class="advanced-search-status muted">
|
|
<span *ngIf="serverConfig" class="me-1" i18n>using {{ serverConfig.search.searchIndex.url }}</span>
|
|
</div>
|
|
</div>
|
|
<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>
|
|
</div>
|
|
|
|
<!-- search instructions, when search input is empty -->
|
|
<div *ngIf="areInstructionsDisplayed()" id="typeahead-instructions" class="overflow-hidden">
|
|
<span class="muted" i18n>Your query will be matched against video names or descriptions, channel names.</span>
|
|
<div class="d-flex justify-content-between mt-3">
|
|
<label class="small-title" i18n>ADVANCED SEARCH</label>
|
|
<div class="advanced-search-status c-help">
|
|
<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.">
|
|
<span *ngIf="canSearchAnyURI()" class="me-1" i18n>any instance</span>
|
|
<span *ngIf="!canSearchAnyURI()" class="me-1" i18n>only followed instances</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<em>@channel_id@domain</em> <span class="flex-auto muted" i18n>will list the matching channel</span>
|
|
</li>
|
|
<li>
|
|
<em>URL</em> <span class="muted" i18n>will list the matching channel</span>
|
|
</li>
|
|
<li>
|
|
<em>UUID</em> <span class="muted" i18n>will list the matching video</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|