aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-thumbnail.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-09 09:30:37 +0100
committerChocobozzz <me@florianbigard.com>2018-02-09 09:30:37 +0100
commit3290f37c76784f1b96cefb5d389e48db56033b0a (patch)
treef383d1ea4ca666ac976c80c9a1277edd2ef0ef7e /client/src/app/shared/video/video-thumbnail.component.ts
parent7193ad1044d2dfad8f929f0951f9a3601c056f67 (diff)
downloadPeerTube-3290f37c76784f1b96cefb5d389e48db56033b0a.tar.gz
PeerTube-3290f37c76784f1b96cefb5d389e48db56033b0a.tar.zst
PeerTube-3290f37c76784f1b96cefb5d389e48db56033b0a.zip
Video previews take all the width on mobile
Diffstat (limited to 'client/src/app/shared/video/video-thumbnail.component.ts')
-rw-r--r--client/src/app/shared/video/video-thumbnail.component.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/app/shared/video/video-thumbnail.component.ts b/client/src/app/shared/video/video-thumbnail.component.ts
index e543e9903..e52f7dfb0 100644
--- a/client/src/app/shared/video/video-thumbnail.component.ts
+++ b/client/src/app/shared/video/video-thumbnail.component.ts
@@ -1,4 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { isInMobileView } from '@app/shared/misc/utils'
2import { Video } from './video.model' 3import { Video } from './video.model'
3 4
4@Component({ 5@Component({
@@ -9,4 +10,14 @@ import { Video } from './video.model'
9export class VideoThumbnailComponent { 10export class VideoThumbnailComponent {
10 @Input() video: Video 11 @Input() video: Video
11 @Input() nsfw = false 12 @Input() nsfw = false
13
14 getImageUrl () {
15 if (!this.video) return ''
16
17 if (isInMobileView()) {
18 return this.video.previewUrl
19 }
20
21 return this.video.thumbnailUrl
22 }
12} 23}