diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-21 09:34:02 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-21 09:34:02 +0200 |
commit | fd822c1c699fb89bb1c3218e047e1d842bc1ba1a (patch) | |
tree | 4f7e81261f2dc07aa75a83e97f25da1f11e146ea /client/src/app/videos/+video-watch | |
parent | b5bfadf0b5365481179936fd3058134fd8be8e18 (diff) | |
parent | 4550872bcc8f9ef46183463c7b7b74a90cb6d17c (diff) | |
download | PeerTube-fd822c1c699fb89bb1c3218e047e1d842bc1ba1a.tar.gz PeerTube-fd822c1c699fb89bb1c3218e047e1d842bc1ba1a.tar.zst PeerTube-fd822c1c699fb89bb1c3218e047e1d842bc1ba1a.zip |
Merge branch 'release/v1.3.0' into develop
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.scss | 1 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 38 |
2 files changed, 22 insertions, 17 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index 8ca5c4118..bada9bae8 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss | |||
@@ -18,6 +18,7 @@ $player-factor: 1.7; // 16/9 | |||
18 | width: 100% !important; | 18 | width: 100% !important; |
19 | height: auto !important; | 19 | height: auto !important; |
20 | max-height: 300px !important; | 20 | max-height: 300px !important; |
21 | max-width: initial; | ||
21 | border-bottom: 1px solid $separator-border-color !important; | 22 | border-bottom: 1px solid $separator-border-color !important; |
22 | } | 23 | } |
23 | 24 | ||
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index b147b75b0..631504eab 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -119,23 +119,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
119 | if (videoId) this.loadVideo(videoId) | 119 | if (videoId) this.loadVideo(videoId) |
120 | }) | 120 | }) |
121 | 121 | ||
122 | this.hotkeys = [ | 122 | this.initHotkeys() |
123 | new Hotkey('shift+l', (event: KeyboardEvent): boolean => { | ||
124 | this.setLike() | ||
125 | return false | ||
126 | }, undefined, this.i18n('Like the video')), | ||
127 | new Hotkey('shift+d', (event: KeyboardEvent): boolean => { | ||
128 | this.setDislike() | ||
129 | return false | ||
130 | }, undefined, this.i18n('Dislike the video')), | ||
131 | new Hotkey('shift+s', (event: KeyboardEvent): boolean => { | ||
132 | this.subscribeButton.subscribed ? | ||
133 | this.subscribeButton.unsubscribe() : | ||
134 | this.subscribeButton.subscribe() | ||
135 | return false | ||
136 | }, undefined, this.i18n('Subscribe to the account')) | ||
137 | ] | ||
138 | if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) | ||
139 | } | 123 | } |
140 | 124 | ||
141 | ngOnDestroy () { | 125 | ngOnDestroy () { |
@@ -565,4 +549,24 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
565 | this.player = undefined | 549 | this.player = undefined |
566 | } | 550 | } |
567 | } | 551 | } |
552 | |||
553 | private initHotkeys () { | ||
554 | this.hotkeys = [ | ||
555 | new Hotkey('shift+l', (event: KeyboardEvent): boolean => { | ||
556 | this.setLike() | ||
557 | return false | ||
558 | }, undefined, this.i18n('Like the video')), | ||
559 | new Hotkey('shift+d', (event: KeyboardEvent): boolean => { | ||
560 | this.setDislike() | ||
561 | return false | ||
562 | }, undefined, this.i18n('Dislike the video')), | ||
563 | new Hotkey('shift+s', (event: KeyboardEvent): boolean => { | ||
564 | this.subscribeButton.subscribed ? | ||
565 | this.subscribeButton.unsubscribe() : | ||
566 | this.subscribeButton.subscribe() | ||
567 | return false | ||
568 | }, undefined, this.i18n('Subscribe to the account')) | ||
569 | ] | ||
570 | if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) | ||
571 | } | ||
568 | } | 572 | } |