aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-details.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-03 10:12:36 +0100
committerChocobozzz <me@florianbigard.com>2018-01-03 10:38:19 +0100
commit47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 (patch)
tree25e2836baf3dfce6f422192d98332db1bfe65890 /client/src/app/shared/video/video-details.model.ts
parentc5911fd347c76e8bdc05ea9f3ee9efed4a58c236 (diff)
downloadPeerTube-47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04.tar.gz
PeerTube-47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04.tar.zst
PeerTube-47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04.zip
Add ability to disable video comments
Diffstat (limited to 'client/src/app/shared/video/video-details.model.ts')
-rw-r--r--client/src/app/shared/video/video-details.model.ts16
1 files changed, 7 insertions, 9 deletions
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 @@
1import { Account } from '../../../../../shared/models/actors'
2import { Video } from '../../shared/video/video.model'
3import { AuthUser } from '../../core'
4import { 1import {
5 VideoDetails as VideoDetailsServerModel, 2 UserRight, VideoChannel, VideoDetails as VideoDetailsServerModel, VideoFile, VideoPrivacy,
6 VideoFile, 3 VideoResolution
7 VideoChannel,
8 VideoResolution,
9 UserRight,
10 VideoPrivacy
11} from '../../../../../shared' 4} from '../../../../../shared'
5import { Account } from '../../../../../shared/models/actors'
6import { AuthUser } from '../../core'
7import { Video } from '../../shared/video/video.model'
12 8
13export class VideoDetails extends Video implements VideoDetailsServerModel { 9export class VideoDetails extends Video implements VideoDetailsServerModel {
14 accountName: string 10 accountName: string
@@ -48,6 +44,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
48 account: Account 44 account: Account
49 likesPercent: number 45 likesPercent: number
50 dislikesPercent: number 46 dislikesPercent: number
47 commentsEnabled: boolean
51 48
52 constructor (hash: VideoDetailsServerModel) { 49 constructor (hash: VideoDetailsServerModel) {
53 super(hash) 50 super(hash)
@@ -59,6 +56,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
59 this.channel = hash.channel 56 this.channel = hash.channel
60 this.account = hash.account 57 this.account = hash.account
61 this.tags = hash.tags 58 this.tags = hash.tags
59 this.commentsEnabled = hash.commentsEnabled
62 60
63 this.likesPercent = (this.likes / (this.likes + this.dislikes)) * 100 61 this.likesPercent = (this.likes / (this.likes + this.dislikes)) * 100
64 this.dislikesPercent = (this.dislikes / (this.likes + this.dislikes)) * 100 62 this.dislikesPercent = (this.dislikes / (this.likes + this.dislikes)) * 100