]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/video-list/video-miniature.component.ts
Client: fix loading server configurations
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-miniature.component.ts
CommitLineData
db7af09b 1import { Component, Input } from '@angular/core'
501bc6c2 2
db7af09b 3import { SortField, Video } from '../shared'
df98563e 4import { User } from '../../shared'
501bc6c2
C
5
6@Component({
7 selector: 'my-video-miniature',
ec8d8440
C
8 styleUrls: [ './video-miniature.component.scss' ],
9 templateUrl: './video-miniature.component.html'
501bc6c2 10})
501bc6c2 11export class VideoMiniatureComponent {
df98563e
C
12 @Input() currentSort: SortField
13 @Input() user: User
14 @Input() video: Video
501bc6c2 15
df98563e
C
16 getVideoName () {
17 if (this.isVideoNSFWForThisUser()) {
18 return 'NSFW'
19 }
92fb909c 20
df98563e 21 return this.video.name
92fb909c
C
22 }
23
df98563e
C
24 isVideoNSFWForThisUser () {
25 return this.video.isVideoNSFWForUser(this.user)
92fb909c 26 }
501bc6c2 27}