aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-03 17:25:47 +0100
committerChocobozzz <me@florianbigard.com>2018-01-03 17:35:00 +0100
commitcf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee (patch)
treeab51ac2f2c7ec8dfc7fcde99565a4430874da599 /client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
parent265ba139ebf56bbdc1c65f6ea4f367774c691fc0 (diff)
downloadPeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.tar.gz
PeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.tar.zst
PeerTube-cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee.zip
Add avatar in comments
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comment-add.component.ts')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment-add.component.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
index a6525987e..27655eca7 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
@@ -5,6 +5,7 @@ import { Observable } from 'rxjs/Observable'
5import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model' 5import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model'
6import { FormReactive } from '../../../shared' 6import { FormReactive } from '../../../shared'
7import { VIDEO_COMMENT_TEXT } from '../../../shared/forms/form-validators/video-comment' 7import { VIDEO_COMMENT_TEXT } from '../../../shared/forms/form-validators/video-comment'
8import { User } from '../../../shared/users'
8import { Video } from '../../../shared/video/video.model' 9import { Video } from '../../../shared/video/video.model'
9import { VideoComment } from './video-comment.model' 10import { VideoComment } from './video-comment.model'
10import { VideoCommentService } from './video-comment.service' 11import { VideoCommentService } from './video-comment.service'
@@ -15,6 +16,7 @@ import { VideoCommentService } from './video-comment.service'
15 styleUrls: ['./video-comment-add.component.scss'] 16 styleUrls: ['./video-comment-add.component.scss']
16}) 17})
17export class VideoCommentAddComponent extends FormReactive implements OnInit { 18export class VideoCommentAddComponent extends FormReactive implements OnInit {
19 @Input() user: User
18 @Input() video: Video 20 @Input() video: Video
19 @Input() parentComment: VideoComment 21 @Input() parentComment: VideoComment
20 @Input() focusOnInit = false 22 @Input() focusOnInit = false
@@ -79,6 +81,10 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
79 return this.form.value['text'] 81 return this.form.value['text']
80 } 82 }
81 83
84 getUserAvatarUrl () {
85 return this.user.getAvatarUrl()
86 }
87
82 private addCommentReply (commentCreate: VideoCommentCreate) { 88 private addCommentReply (commentCreate: VideoCommentCreate) {
83 return this.videoCommentService 89 return this.videoCommentService
84 .addCommentReply(this.video.id, this.parentComment.id, commentCreate) 90 .addCommentReply(this.video.id, this.parentComment.id, commentCreate)