diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-05 11:19:25 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-05 11:19:25 +0100 |
commit | d7e70384a360cda51fe23712331110a5c8b1124c (patch) | |
tree | 385609669c92936a5c66ae028c331fb4a9b5943e /client/src/app/videos/+video-watch/comment/video-comment.component.ts | |
parent | 2890b615f31ab7d519d8be66b49ff8712df90c51 (diff) | |
download | PeerTube-d7e70384a360cda51fe23712331110a5c8b1124c.tar.gz PeerTube-d7e70384a360cda51fe23712331110a5c8b1124c.tar.zst PeerTube-d7e70384a360cda51fe23712331110a5c8b1124c.zip |
Add mentions to comments
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comment.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comment.component.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.ts b/client/src/app/videos/+video-watch/comment/video-comment.component.ts index 2ecc8a143..38e603d0d 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment.component.ts | |||
@@ -16,6 +16,7 @@ import { VideoComment } from './video-comment.model' | |||
16 | export class VideoCommentComponent implements OnInit { | 16 | export class VideoCommentComponent implements OnInit { |
17 | @Input() video: Video | 17 | @Input() video: Video |
18 | @Input() comment: VideoComment | 18 | @Input() comment: VideoComment |
19 | @Input() parentComments: VideoComment[] = [] | ||
19 | @Input() commentTree: VideoCommentThreadTree | 20 | @Input() commentTree: VideoCommentThreadTree |
20 | @Input() inReplyToCommentId: number | 21 | @Input() inReplyToCommentId: number |
21 | 22 | ||
@@ -25,6 +26,7 @@ export class VideoCommentComponent implements OnInit { | |||
25 | @Output() resetReply = new EventEmitter() | 26 | @Output() resetReply = new EventEmitter() |
26 | 27 | ||
27 | sanitizedCommentHTML = '' | 28 | sanitizedCommentHTML = '' |
29 | newParentComments = [] | ||
28 | 30 | ||
29 | constructor (private authService: AuthService) {} | 31 | constructor (private authService: AuthService) {} |
30 | 32 | ||
@@ -36,6 +38,8 @@ export class VideoCommentComponent implements OnInit { | |||
36 | this.sanitizedCommentHTML = sanitizeHtml(this.comment.text, { | 38 | this.sanitizedCommentHTML = sanitizeHtml(this.comment.text, { |
37 | allowedTags: [ 'p', 'span' ] | 39 | allowedTags: [ 'p', 'span' ] |
38 | }) | 40 | }) |
41 | |||
42 | this.newParentComments = this.parentComments.concat([ this.comment ]) | ||
39 | } | 43 | } |
40 | 44 | ||
41 | onCommentReplyCreated (createdComment: VideoComment) { | 45 | onCommentReplyCreated (createdComment: VideoComment) { |