X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Fhotkeys%2Fhotkeys.component.ts;h=512a2399a545677f5a991fd0a06665b02192bcfc;hb=1d17d86349fd2b3a9bc85145d02383ba4aea4dc0;hp=f6f299965a82b12e7e34865feaf49777ada9bb03;hpb=7aba23d13fe56835b07ebb00c0b4c2a929551ec3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/hotkeys/hotkeys.component.ts b/client/src/app/core/hotkeys/hotkeys.component.ts index f6f299965..512a2399a 100644 --- a/client/src/app/core/hotkeys/hotkeys.component.ts +++ b/client/src/app/core/hotkeys/hotkeys.component.ts @@ -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 } }