-import { catchError, subscribeOn } from 'rxjs/operators'
+import { catchError } from 'rxjs/operators'
import { ChangeDetectorRef, Component, ElementRef, Inject, LOCALE_ID, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { RedirectService } from '@app/core/routing/redirect.service'
})
this.hotkeys = [
- new Hotkey('L', (event: KeyboardEvent): boolean => {
+ new Hotkey('shift+l', (event: KeyboardEvent): boolean => {
this.setLike()
return false
- }, undefined, 'Like the video'),
- new Hotkey('D', (event: KeyboardEvent): boolean => {
+ }, undefined, this.i18n('Like the video')),
+ new Hotkey('shift+d', (event: KeyboardEvent): boolean => {
this.setDislike()
return false
- }, undefined, 'Dislike the video'),
- new Hotkey('S', (event: KeyboardEvent): boolean => {
+ }, undefined, this.i18n('Dislike the video')),
+ new Hotkey('shift+s', (event: KeyboardEvent): boolean => {
this.subscribeButton.subscribed ?
this.subscribeButton.unsubscribe() :
this.subscribeButton.subscribe()
return false
- }, undefined, 'Subscribe to the account')
+ }, undefined, this.i18n('Subscribe to the account'))
]
if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys)
}
return this.video && this.video.state.id === VideoState.TO_IMPORT
}
- isMenuExpanded () {
- return document.getElementById('right-container').classList.contains('expanded')
- }
-
hasVideoScheduledPublication () {
return this.video && this.video.scheduledUpdate !== undefined
}