]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
add a hotkey for menu toggling and a secondary hotkey to search
authorRigel Kent <sendmemail@rigelk.eu>
Sun, 2 Sep 2018 19:46:43 +0000 (21:46 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 3 Sep 2018 06:49:29 +0000 (08:49 +0200)
client/src/app/app.component.ts

index 40eac7fb8df9689347e4c6ae254f227daa77e8e8..5086384f46e0c86abe842e1c0fe5ca65e0949a25 100644 (file)
@@ -124,10 +124,14 @@ export class AppComponent implements OnInit {
         })
 
     this.hotkeysService.add([
-      new Hotkey('/', (event: KeyboardEvent): boolean => {
+      new Hotkey(['/', 's'], (event: KeyboardEvent): boolean => {
         document.getElementById('search-video').focus()
-        return false // Prevent bubbling
+        return false
       }, undefined, 'Focus the search bar'),
+      new Hotkey('b', (event: KeyboardEvent): boolean => {
+        this.toggleMenu()
+        return false
+      }, undefined, 'Toggle the left menu'),
       new Hotkey('g s', (event: KeyboardEvent): boolean => {
         this.router.navigate([ '/videos/subscriptions' ])
         return false