aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-20 10:12:31 +0100
committerChocobozzz <me@florianbigard.com>2019-03-20 10:12:31 +0100
commit7e73f07131a6738b299311448ab4491eb532838a (patch)
tree38705b4e65a1e3ee0e5ecf7417ad827ed32c9381 /client/src/app/videos/+video-watch/comment/video-comment.model.ts
parent308421283adf8df1a6a1972cd0efe198b0d93435 (diff)
downloadPeerTube-7e73f07131a6738b299311448ab4491eb532838a.tar.gz
PeerTube-7e73f07131a6738b299311448ab4491eb532838a.tar.zst
PeerTube-7e73f07131a6738b299311448ab4491eb532838a.zip
Improve comment deletion message
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comment.model.ts')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.model.ts7
1 files changed, 7 insertions, 0 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 824fb24c3..3ed3ddcc7 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,6 +1,7 @@
1import { Account as AccountInterface } from '../../../../../../shared/models/actors' 1import { Account as AccountInterface } from '../../../../../../shared/models/actors'
2import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model' 2import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model'
3import { Actor } from '@app/shared/actor/actor.model' 3import { Actor } from '@app/shared/actor/actor.model'
4import { getAbsoluteAPIUrl } from '@app/shared/misc/utils'
4 5
5export class VideoComment implements VideoCommentServerModel { 6export class VideoComment implements VideoCommentServerModel {
6 id: number 7 id: number
@@ -16,6 +17,8 @@ export class VideoComment implements VideoCommentServerModel {
16 by: string 17 by: string
17 accountAvatarUrl: string 18 accountAvatarUrl: string
18 19
20 isLocal: boolean
21
19 constructor (hash: VideoCommentServerModel) { 22 constructor (hash: VideoCommentServerModel) {
20 this.id = hash.id 23 this.id = hash.id
21 this.url = hash.url 24 this.url = hash.url
@@ -30,5 +33,9 @@ export class VideoComment implements VideoCommentServerModel {
30 33
31 this.by = Actor.CREATE_BY_STRING(this.account.name, this.account.host) 34 this.by = Actor.CREATE_BY_STRING(this.account.name, this.account.host)
32 this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account) 35 this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account)
36
37 const absoluteAPIUrl = getAbsoluteAPIUrl()
38 const thisHost = new URL(absoluteAPIUrl).host
39 this.isLocal = this.account.host.trim() === thisHost
33 } 40 }
34} 41}