]>
Commit | Line | Data |
---|---|---|
1 | import { Component, Input } from '@angular/core' | |
2 | import { User } from '../users' | |
3 | import { Video } from './video.model' | |
4 | import { ServerService } from '@app/core' | |
5 | ||
6 | @Component({ | |
7 | selector: 'my-video-miniature', | |
8 | styleUrls: [ './video-miniature.component.scss' ], | |
9 | templateUrl: './video-miniature.component.html' | |
10 | }) | |
11 | export class VideoMiniatureComponent { | |
12 | @Input() user: User | |
13 | @Input() video: Video | |
14 | ||
15 | constructor (private serverService: ServerService) { } | |
16 | ||
17 | isVideoBlur () { | |
18 | return this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig()) | |
19 | } | |
20 | } |