diff options
Diffstat (limited to 'client/src/app/videos/video-list/video-miniature.component.ts')
-rw-r--r-- | client/src/app/videos/video-list/video-miniature.component.ts | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/client/src/app/videos/video-list/video-miniature.component.ts b/client/src/app/videos/video-list/video-miniature.component.ts index 28601ca7f..1cfeacf36 100644 --- a/client/src/app/videos/video-list/video-miniature.component.ts +++ b/client/src/app/videos/video-list/video-miniature.component.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; | 1 | import { Component, Input, Output, EventEmitter } from '@angular/core' |
2 | 2 | ||
3 | import { NotificationsService } from 'angular2-notifications'; | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | 4 | ||
5 | import { ConfirmService, ConfigService } from '../../core'; | 5 | import { ConfirmService, ConfigService } from '../../core' |
6 | import { SortField, Video, VideoService } from '../shared'; | 6 | import { SortField, Video, VideoService } from '../shared' |
7 | import { User } from '../../shared'; | 7 | import { User } from '../../shared' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-video-miniature', | 10 | selector: 'my-video-miniature', |
@@ -13,25 +13,26 @@ import { User } from '../../shared'; | |||
13 | }) | 13 | }) |
14 | 14 | ||
15 | export class VideoMiniatureComponent { | 15 | export class VideoMiniatureComponent { |
16 | @Input() currentSort: SortField; | 16 | @Input() currentSort: SortField |
17 | @Input() user: User; | 17 | @Input() user: User |
18 | @Input() video: Video; | 18 | @Input() video: Video |
19 | 19 | ||
20 | constructor( | 20 | constructor ( |
21 | private notificationsService: NotificationsService, | 21 | private notificationsService: NotificationsService, |
22 | private confirmService: ConfirmService, | 22 | private confirmService: ConfirmService, |
23 | private configService: ConfigService, | 23 | private configService: ConfigService, |
24 | private videoService: VideoService | 24 | private videoService: VideoService |
25 | ) {} | 25 | ) {} |
26 | 26 | ||
27 | getVideoName() { | 27 | getVideoName () { |
28 | if (this.isVideoNSFWForThisUser()) | 28 | if (this.isVideoNSFWForThisUser()) { |
29 | return 'NSFW'; | 29 | return 'NSFW' |
30 | } | ||
30 | 31 | ||
31 | return this.video.name; | 32 | return this.video.name |
32 | } | 33 | } |
33 | 34 | ||
34 | isVideoNSFWForThisUser() { | 35 | isVideoNSFWForThisUser () { |
35 | return this.video.isVideoNSFWForUser(this.user); | 36 | return this.video.isVideoNSFWForUser(this.user) |
36 | } | 37 | } |
37 | } | 38 | } |