]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/hotkeys/hotkeys.component.ts
Merge branch 'open-api-clients' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / core / hotkeys / hotkeys.component.ts
index f6f299965a82b12e7e34865feaf49777ada9bb03..512a2399a545677f5a991fd0a06665b02192bcfc 100644 (file)
@@ -9,8 +9,8 @@ import { HotkeysService, Hotkey } from 'angular2-hotkeys'
   styleUrls: [ './hotkeys.component.scss' ]
 })
 export class CheatSheetComponent implements OnInit, OnDestroy {
-  helpVisible = false
   @Input() title = this.i18n('Keyboard Shortcuts:')
+  helpVisible = false
   subscription: Subscription
 
   hotkeys: Hotkey[]
@@ -29,7 +29,7 @@ export class CheatSheetComponent implements OnInit, OnDestroy {
       if (isOpen === false) {
         this.helpVisible = false
       } else {
-        this.toggleCheatSheet()
+        this.toggleHelpVisible()
       }
     })
   }
@@ -41,6 +41,10 @@ export class CheatSheetComponent implements OnInit, OnDestroy {
   }
 
   public toggleCheatSheet (): void {
+    this.hotkeysService.cheatSheetToggle.next(!this.helpVisible)
+  }
+
+  public toggleHelpVisible (): void {
     this.helpVisible = !this.helpVisible
   }
 }