-import { Component, Input, Output, EventEmitter } from '@angular/core';
+import { Component, Input, Output, EventEmitter } from '@angular/core'
-import { NotificationsService } from 'angular2-notifications';
+import { NotificationsService } from 'angular2-notifications'
-import { ConfirmService, ConfigService } from '../../core';
-import { SortField, Video, VideoService } from '../shared';
-import { User } from '../../shared';
+import { ConfirmService, ConfigService } from '../../core'
+import { SortField, Video, VideoService } from '../shared'
+import { User } from '../../shared'
@Component({
selector: 'my-video-miniature',
})
export class VideoMiniatureComponent {
- @Input() currentSort: SortField;
- @Input() user: User;
- @Input() video: Video;
+ @Input() currentSort: SortField
+ @Input() user: User
+ @Input() video: Video
- hovering = false;
-
- constructor(
+ constructor (
private notificationsService: NotificationsService,
private confirmService: ConfirmService,
private configService: ConfigService,
private videoService: VideoService
) {}
- getVideoName() {
- if (this.isVideoNSFWForThisUser())
- return 'NSFW';
-
- return this.video.name;
- }
-
- onBlur() {
- this.hovering = false;
- }
+ getVideoName () {
+ if (this.isVideoNSFWForThisUser()) {
+ return 'NSFW'
+ }
- onHover() {
- this.hovering = true;
+ return this.video.name
}
- isVideoNSFWForThisUser() {
- return this.video.isVideoNSFWForUser(this.user);
+ isVideoNSFWForThisUser () {
+ return this.video.isVideoNSFWForUser(this.user)
}
}