aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header/suggestion.component.html
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-25 16:32:06 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-02-13 16:32:21 +0100
commit6af662a5961b48ac12682df2b8b971060a2cc67d (patch)
treede1efc71cbe8543b5b832e5de99a407a54c37220 /client/src/app/header/suggestion.component.html
parentf409f0c3b91d85c66b4841d72ea65b5fbe1483d8 (diff)
downloadPeerTube-6af662a5961b48ac12682df2b8b971060a2cc67d.tar.gz
PeerTube-6af662a5961b48ac12682df2b8b971060a2cc67d.tar.zst
PeerTube-6af662a5961b48ac12682df2b8b971060a2cc67d.zip
Add keyboard navigation and hepler to typeahead
Diffstat (limited to 'client/src/app/header/suggestion.component.html')
-rw-r--r--client/src/app/header/suggestion.component.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/client/src/app/header/suggestion.component.html b/client/src/app/header/suggestion.component.html
new file mode 100644
index 000000000..894cacb95
--- /dev/null
+++ b/client/src/app/header/suggestion.component.html
@@ -0,0 +1,28 @@
1<a tabindex="-1" class="d-flex flex-auto flex-items-center p-2" [class.focus-visible]="active" [routerLink]="result.routerLink">
2 <div class="flex-shrink-0 mr-2 text-center">
3 <my-global-icon *ngIf="result.type !== 'channel'" iconName="search"></my-global-icon>
4 <my-global-icon *ngIf="result.type === 'channel'" iconName="folder"></my-global-icon>
5 </div>
6
7 <img class="avatar mr-2 flex-shrink-0 d-none" alt="" aria-label="Team" src="" width="28" height="28">
8
9 <div class="flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target" [attr.aria-label]="result.text" [innerHTML]="result.text | highlight : highlight"></div>
10
11 <div *ngIf="result.type !== 'channel' && result.type !== 'suggestion'" class="border rounded flex-shrink-0 px-1 bg-gray text-gray-light ml-1 f6">
12 <span *ngIf="result.type === 'search-channel'" [attr.aria-label]="inThisChannelText">
13 {{ inThisChannelText }}
14 </span>
15 <span *ngIf="result.type === 'search-instance'" [attr.aria-label]="inThisInstanceText">
16 {{ inThisInstanceText }}
17 </span>
18 <span *ngIf="result.type === 'search-global'" [attr.aria-label]="inAllText">
19 {{ inAllText }}
20 </span>
21 <span *ngIf="result.type === 'search-any'" aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
22 </div>
23
24 <div *ngIf="result.type === 'channel'" aria-hidden="true" class="border rounded flex-shrink-0 px-1 bg-gray text-gray-light ml-1 f6 d-on-nav-focus" i18n>
25 Jump to channel
26 <span class="d-inline-block ml-1 v-align-middle">↵</span>
27 </div>
28</a> \ No newline at end of file