From 47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Jan 2018 10:12:36 +0100 Subject: Add ability to disable video comments --- client/src/app/shared/video/video-details.model.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'client/src/app/shared/video/video-details.model.ts') diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index 8243b9f1c..cf6b71b60 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts @@ -1,14 +1,10 @@ -import { Account } from '../../../../../shared/models/actors' -import { Video } from '../../shared/video/video.model' -import { AuthUser } from '../../core' import { - VideoDetails as VideoDetailsServerModel, - VideoFile, - VideoChannel, - VideoResolution, - UserRight, - VideoPrivacy + UserRight, VideoChannel, VideoDetails as VideoDetailsServerModel, VideoFile, VideoPrivacy, + VideoResolution } from '../../../../../shared' +import { Account } from '../../../../../shared/models/actors' +import { AuthUser } from '../../core' +import { Video } from '../../shared/video/video.model' export class VideoDetails extends Video implements VideoDetailsServerModel { accountName: string @@ -48,6 +44,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { account: Account likesPercent: number dislikesPercent: number + commentsEnabled: boolean constructor (hash: VideoDetailsServerModel) { super(hash) @@ -59,6 +56,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { this.channel = hash.channel this.account = hash.account this.tags = hash.tags + this.commentsEnabled = hash.commentsEnabled this.likesPercent = (this.likes / (this.likes + this.dislikes)) * 100 this.dislikesPercent = (this.dislikes / (this.likes + this.dislikes)) * 100 -- cgit v1.2.3