X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo%2Fvideo-thumbnail.component.ts;h=fe65ade9442a1b5da0beedaab65b269fa699d0fd;hb=8c559fad1e1c4c2ab7f1388c73200aa4c6256d74;hp=ca43700c7c7d620eba0ce29fe3034564569eb714;hpb=6d8c8ea73a774c3568e6d28a4cbebcf7979d5c2a;p=oweals%2Fpeertube.git 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' export class VideoThumbnailComponent { @Input() video: Video @Input() nsfw = false + @Input() routerLink: any[] + @Input() queryParams: any[] - constructor (private screenService: ScreenService) {} + constructor (private screenService: ScreenService) { + } getImageUrl () { if (!this.video) return '' @@ -30,4 +33,10 @@ export class VideoThumbnailComponent { return (currentTime / this.video.duration) * 100 } + + getVideoRouterLink () { + if (this.routerLink) return this.routerLink + + return [ '/videos/watch', this.video.uuid ] + } }