+ })
+
+ this.hotkeysService.add([
+ new Hotkey(['/', 's'], (event: KeyboardEvent): boolean => {
+ document.getElementById('search-video').focus()
+ return false
+ }, undefined, this.i18n('Focus the search bar')),
+ new Hotkey('b', (event: KeyboardEvent): boolean => {
+ this.toggleMenu()
+ return false
+ }, undefined, this.i18n('Toggle the left menu')),
+ new Hotkey('g o', (event: KeyboardEvent): boolean => {
+ this.router.navigate([ '/videos/overview' ])
+ return false
+ }, undefined, this.i18n('Go to the videos overview page')),
+ new Hotkey('g t', (event: KeyboardEvent): boolean => {
+ this.router.navigate([ '/videos/trending' ])
+ return false
+ }, undefined, this.i18n('Go to the trending videos page')),
+ new Hotkey('g r', (event: KeyboardEvent): boolean => {
+ this.router.navigate([ '/videos/recently-added' ])
+ return false
+ }, undefined, this.i18n('Go to the recently added videos page')),
+ new Hotkey('g l', (event: KeyboardEvent): boolean => {
+ this.router.navigate([ '/videos/local' ])
+ return false
+ }, undefined, this.i18n('Go to the local videos page')),
+ new Hotkey('g u', (event: KeyboardEvent): boolean => {
+ this.router.navigate([ '/videos/upload' ])
+ return false
+ }, undefined, this.i18n('Go to the videos upload page')),
+ new Hotkey('shift+t', (event: KeyboardEvent): boolean => {
+ this.themeService.toggleDarkTheme()
+ return false
+ }, undefined, this.i18n('Toggle Dark theme'))
+ ])
+
+ fromEvent(window, 'resize')
+ .pipe(debounceTime(200))
+ .subscribe(() => this.onResize())
+ }
+
+ isUserLoggedIn () {
+ return this.authService.isLoggedIn()