aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-08 10:35:54 +0100
committerChocobozzz <me@florianbigard.com>2018-01-08 10:35:54 +0100
commit76d36e0b355f41fb46709ba5e39c59b10087c6a9 (patch)
tree7a88cb3f071c458d032cf11943dec40510d3622b /client/src/app/videos
parent93ef8a9d02059da2fc90efedb7755c97e9e19ef4 (diff)
downloadPeerTube-76d36e0b355f41fb46709ba5e39c59b10087c6a9.tar.gz
PeerTube-76d36e0b355f41fb46709ba5e39c59b10087c6a9.tar.zst
PeerTube-76d36e0b355f41fb46709ba5e39c59b10087c6a9.zip
Refractor account by
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.model.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.model.ts b/client/src/app/videos/+video-watch/comment/video-comment.model.ts
index abecae303..4c5971f54 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.model.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment.model.ts
@@ -1,4 +1,5 @@
1import { Account } from '../../../../../../shared/models/actors' 1import { Account } from '@app/shared/account/account.model'
2import { Account as AccountInterface } from '../../../../../../shared/models/actors'
2import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model' 3import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model'
3 4
4export class VideoComment implements VideoCommentServerModel { 5export class VideoComment implements VideoCommentServerModel {
@@ -10,15 +11,11 @@ export class VideoComment implements VideoCommentServerModel {
10 videoId: number 11 videoId: number
11 createdAt: Date | string 12 createdAt: Date | string
12 updatedAt: Date | string 13 updatedAt: Date | string
13 account: Account 14 account: AccountInterface
14 totalReplies: number 15 totalReplies: number
15 16
16 by: string 17 by: string
17 18
18 private static createByString (account: string, serverHost: string) {
19 return account + '@' + serverHost
20 }
21
22 constructor (hash: VideoCommentServerModel) { 19 constructor (hash: VideoCommentServerModel) {
23 this.id = hash.id 20 this.id = hash.id
24 this.url = hash.url 21 this.url = hash.url
@@ -31,6 +28,6 @@ export class VideoComment implements VideoCommentServerModel {
31 this.account = hash.account 28 this.account = hash.account
32 this.totalReplies = hash.totalReplies 29 this.totalReplies = hash.totalReplies
33 30
34 this.by = VideoComment.createByString(this.account.name, this.account.host) 31 this.by = Account.CREATE_BY_STRING(this.account.name, this.account.host)
35 } 32 }
36} 33}