aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header/suggestion.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-02-03 14:04:42 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-02-13 16:32:58 +0100
commit52cc0d54850e0acf069d2f95d063826f16ff5238 (patch)
treefb7450bc09fc5aa34c480bd197407c4881b85299 /client/src/app/header/suggestion.component.ts
parent6af662a5961b48ac12682df2b8b971060a2cc67d (diff)
downloadPeerTube-52cc0d54850e0acf069d2f95d063826f16ff5238.tar.gz
PeerTube-52cc0d54850e0acf069d2f95d063826f16ff5238.tar.zst
PeerTube-52cc0d54850e0acf069d2f95d063826f16ff5238.zip
Gracefully downsize search bar for mobile devices
Diffstat (limited to 'client/src/app/header/suggestion.component.ts')
-rw-r--r--client/src/app/header/suggestion.component.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/header/suggestion.component.ts b/client/src/app/header/suggestion.component.ts
index 75c44a583..bdcb3e03f 100644
--- a/client/src/app/header/suggestion.component.ts
+++ b/client/src/app/header/suggestion.component.ts
@@ -3,10 +3,11 @@ import { RouterLink } from '@angular/router'
3import { I18n } from '@ngx-translate/i18n-polyfill' 3import { I18n } from '@ngx-translate/i18n-polyfill'
4import { ListKeyManagerOption } from '@angular/cdk/a11y' 4import { ListKeyManagerOption } from '@angular/cdk/a11y'
5 5
6type Result = { 6export type Result = {
7 text: string 7 text: string
8 type: 'channel' | 'suggestion' | 'search-channel' | 'search-instance' | 'search-global' | 'search-any' 8 type: 'channel' | 'suggestion' | 'search-channel' | 'search-instance' | 'search-global' | 'search-any'
9 routerLink?: RouterLink 9 routerLink?: RouterLink,
10 default?: boolean
10} 11}
11 12
12@Component({ 13@Component({
@@ -39,7 +40,7 @@ export class SuggestionComponent implements OnInit, ListKeyManagerOption {
39 } 40 }
40 41
41 ngOnInit () { 42 ngOnInit () {
42 this.active = false 43 if (this.result.default) this.active = true
43 } 44 }
44 45
45 selectItem () { 46 selectItem () {