diff options
Diffstat (limited to 'client/app/videos/video-list/video-miniature.component.ts')
-rw-r--r-- | client/app/videos/video-list/video-miniature.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/app/videos/video-list/video-miniature.component.ts b/client/app/videos/video-list/video-miniature.component.ts index 73416607a..3baa1ddd6 100644 --- a/client/app/videos/video-list/video-miniature.component.ts +++ b/client/app/videos/video-list/video-miniature.component.ts | |||
@@ -16,23 +16,23 @@ import { User } from '../../users/index'; | |||
16 | export class VideoMiniatureComponent { | 16 | export class VideoMiniatureComponent { |
17 | @Output() removed = new EventEmitter<any>(); | 17 | @Output() removed = new EventEmitter<any>(); |
18 | 18 | ||
19 | @Input() video: Video; | ||
20 | @Input() user: User; | 19 | @Input() user: User; |
20 | @Input() video: Video; | ||
21 | 21 | ||
22 | hovering = false; | 22 | hovering = false; |
23 | 23 | ||
24 | constructor(private videoService: VideoService) {} | 24 | constructor(private videoService: VideoService) {} |
25 | 25 | ||
26 | onHover() { | 26 | displayRemoveIcon() { |
27 | this.hovering = true; | 27 | return this.hovering && this.video.isRemovableBy(this.user); |
28 | } | 28 | } |
29 | 29 | ||
30 | onBlur() { | 30 | onBlur() { |
31 | this.hovering = false; | 31 | this.hovering = false; |
32 | } | 32 | } |
33 | 33 | ||
34 | displayRemoveIcon() { | 34 | onHover() { |
35 | return this.hovering && this.video.isRemovableBy(this.user); | 35 | this.hovering = true; |
36 | } | 36 | } |
37 | 37 | ||
38 | removeVideo(id: string) { | 38 | removeVideo(id: string) { |