blob: 0c9df618e4cf3c361b231457f75c49758afb64d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<div class="d-inline-flex position-relative" id="typeahead-container">
<input
type="text" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, channels…"
[(ngModel)]="search" (ngModelChange)="onSearchChange()" (keyup)="handleKeyUp($event)"
>
<span class="icon icon-search" (click)="doSearch()"></span>
<div class="position-absolute jump-to-suggestions">
<!-- suggestions -->
<my-suggestions *ngIf="search && newSearch" [results]="results" [highlight]="search" (init)="initKeyboardEventsManager($event)"></my-suggestions>
<!-- suggestion help, not shown until one of the suggestions is selected and specific to that suggestion -->
<div *ngIf="showHelp" id="typeahead-help" class="overflow-hidden">
<ng-container *ngIf="activeResult.type === 'search-global'">
<div class="d-flex justify-content-between">
<label class="small-title" i18n>Global search</label>
<div class="advanced-search-status text-muted">
<span *ngIf="serverConfig" class="mr-1" i18n>using {{ serverConfig.followings.instance.autoFollowIndex.indexUrl }}</span>
<i class="glyphicon glyphicon-globe"></i>
</div>
</div>
<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>
</ng-container>
</div>
<!-- search instructions, when search input is empty -->
<div *ngIf="areInstructionsDisplayed" id="typeahead-instructions" class="overflow-hidden">
<div class="d-flex justify-content-between">
<label class="small-title" i18n>Advanced search</label>
<div class="advanced-search-status c-help">
<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.">
<span *ngIf="canSearchAnyURI" class="mr-1" i18n>any instance</span>
<span *ngIf="!canSearchAnyURI" class="mr-1" i18n>only followed instances</span>
<i [ngClass]="canSearchAnyURI ? 'glyphicon glyphicon-ok-sign' : 'glyphicon glyphicon-exclamation-sign'"></i>
</span>
</div>
</div>
<ul>
<li>
<em>@username@domain</em> <span class="flex-auto text-muted" i18n>account or channel</span>
</li>
<li>
<em>URL</em> <span class="text-muted" i18n>account or channel</span>
</li>
<li>
<em>URL</em> <span class="text-muted" i18n>video</span>
</li>
</ul>
<span class="text-muted" i18n>Any other text will return matching video, channel or account names.</span>
</div>
</div>
</div>
|