diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-13 14:18:58 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | e2f01c47e08d26a30ad47068d195b3d21d0df8a1 (patch) | |
tree | 21f18ed462d313bfb4ba7a1b5221fdb6b2c35bc1 /client/src/app/shared/video/video-thumbnail.component.ts | |
parent | 15e9d5ca39e0b792f61453fbf3885a0fc446afa7 (diff) | |
download | PeerTube-e2f01c47e08d26a30ad47068d195b3d21d0df8a1.tar.gz PeerTube-e2f01c47e08d26a30ad47068d195b3d21d0df8a1.tar.zst PeerTube-e2f01c47e08d26a30ad47068d195b3d21d0df8a1.zip |
Playlist support in watch page
Diffstat (limited to 'client/src/app/shared/video/video-thumbnail.component.ts')
-rw-r--r-- | client/src/app/shared/video/video-thumbnail.component.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/app/shared/video/video-thumbnail.component.ts b/client/src/app/shared/video/video-thumbnail.component.ts index ca43700c7..fe65ade94 100644 --- a/client/src/app/shared/video/video-thumbnail.component.ts +++ b/client/src/app/shared/video/video-thumbnail.component.ts | |||
@@ -10,8 +10,11 @@ import { ScreenService } from '@app/shared/misc/screen.service' | |||
10 | export class VideoThumbnailComponent { | 10 | export class VideoThumbnailComponent { |
11 | @Input() video: Video | 11 | @Input() video: Video |
12 | @Input() nsfw = false | 12 | @Input() nsfw = false |
13 | @Input() routerLink: any[] | ||
14 | @Input() queryParams: any[] | ||
13 | 15 | ||
14 | constructor (private screenService: ScreenService) {} | 16 | constructor (private screenService: ScreenService) { |
17 | } | ||
15 | 18 | ||
16 | getImageUrl () { | 19 | getImageUrl () { |
17 | if (!this.video) return '' | 20 | if (!this.video) return '' |
@@ -30,4 +33,10 @@ export class VideoThumbnailComponent { | |||
30 | 33 | ||
31 | return (currentTime / this.video.duration) * 100 | 34 | return (currentTime / this.video.duration) * 100 |
32 | } | 35 | } |
36 | |||
37 | getVideoRouterLink () { | ||
38 | if (this.routerLink) return this.routerLink | ||
39 | |||
40 | return [ '/videos/watch', this.video.uuid ] | ||
41 | } | ||
33 | } | 42 | } |