aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-miniature.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video/video-miniature.component.ts')
-rw-r--r--client/src/app/shared/video/video-miniature.component.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/shared/video/video-miniature.component.ts b/client/src/app/shared/video/video-miniature.component.ts
index 07193ebd5..27098f4b4 100644
--- a/client/src/app/shared/video/video-miniature.component.ts
+++ b/client/src/app/shared/video/video-miniature.component.ts
@@ -1,4 +1,4 @@
1import { Component, Input, OnInit } from '@angular/core' 1import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'
2import { User } from '../users' 2import { User } from '../users'
3import { Video } from './video.model' 3import { Video } from './video.model'
4import { ServerService } from '@app/core' 4import { ServerService } from '@app/core'
@@ -8,13 +8,16 @@ export type OwnerDisplayType = 'account' | 'videoChannel' | 'auto'
8@Component({ 8@Component({
9 selector: 'my-video-miniature', 9 selector: 'my-video-miniature',
10 styleUrls: [ './video-miniature.component.scss' ], 10 styleUrls: [ './video-miniature.component.scss' ],
11 templateUrl: './video-miniature.component.html' 11 templateUrl: './video-miniature.component.html',
12 changeDetection: ChangeDetectionStrategy.OnPush
12}) 13})
13export class VideoMiniatureComponent implements OnInit { 14export class VideoMiniatureComponent implements OnInit {
14 @Input() user: User 15 @Input() user: User
15 @Input() video: Video 16 @Input() video: Video
16 @Input() ownerDisplayType: OwnerDisplayType = 'account' 17 @Input() ownerDisplayType: OwnerDisplayType = 'account'
17 18
19 isVideoBlur: boolean
20
18 private ownerDisplayTypeChosen: 'account' | 'videoChannel' 21 private ownerDisplayTypeChosen: 'account' | 'videoChannel'
19 22
20 constructor (private serverService: ServerService) { } 23 constructor (private serverService: ServerService) { }
@@ -35,10 +38,8 @@ export class VideoMiniatureComponent implements OnInit {
35 } else { 38 } else {
36 this.ownerDisplayTypeChosen = 'videoChannel' 39 this.ownerDisplayTypeChosen = 'videoChannel'
37 } 40 }
38 }
39 41
40 isVideoBlur () { 42 this.isVideoBlur = this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig())
41 return this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig())
42 } 43 }
43 44
44 displayOwnerAccount () { 45 displayOwnerAccount () {