aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-09-02 21:46:43 +0200
committerChocobozzz <me@florianbigard.com>2018-09-03 08:49:29 +0200
commit8542dc33e32ca28d542eaa9a25db7c20eccfd6f6 (patch)
tree9b2c27bdbbf6071fb295ca90ae1523a82be3cbca /client
parent61318dd63fc652383cbe043851ade195f061b5f2 (diff)
downloadPeerTube-8542dc33e32ca28d542eaa9a25db7c20eccfd6f6.tar.gz
PeerTube-8542dc33e32ca28d542eaa9a25db7c20eccfd6f6.tar.zst
PeerTube-8542dc33e32ca28d542eaa9a25db7c20eccfd6f6.zip
add a hotkey for menu toggling and a secondary hotkey to search
Diffstat (limited to 'client')
-rw-r--r--client/src/app/app.component.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 40eac7fb8..5086384f4 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -124,10 +124,14 @@ export class AppComponent implements OnInit {
124 }) 124 })
125 125
126 this.hotkeysService.add([ 126 this.hotkeysService.add([
127 new Hotkey('/', (event: KeyboardEvent): boolean => { 127 new Hotkey(['/', 's'], (event: KeyboardEvent): boolean => {
128 document.getElementById('search-video').focus() 128 document.getElementById('search-video').focus()
129 return false // Prevent bubbling 129 return false
130 }, undefined, 'Focus the search bar'), 130 }, undefined, 'Focus the search bar'),
131 new Hotkey('b', (event: KeyboardEvent): boolean => {
132 this.toggleMenu()
133 return false
134 }, undefined, 'Toggle the left menu'),
131 new Hotkey('g s', (event: KeyboardEvent): boolean => { 135 new Hotkey('g s', (event: KeyboardEvent): boolean => {
132 this.router.navigate([ '/videos/subscriptions' ]) 136 this.router.navigate([ '/videos/subscriptions' ])
133 return false 137 return false