diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-03 17:25:47 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-03 17:35:00 +0100 |
commit | cf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee (patch) | |
tree | ab51ac2f2c7ec8dfc7fcde99565a4430874da599 /client/src/app/videos/+video-watch/comment/video-comment-add.component.ts | |
parent | 265ba139ebf56bbdc1c65f6ea4f367774c691fc0 (diff) | |
download | PeerTube-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.ts | 6 |
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' | |||
5 | import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model' | 5 | import { VideoCommentCreate } from '../../../../../../shared/models/videos/video-comment.model' |
6 | import { FormReactive } from '../../../shared' | 6 | import { FormReactive } from '../../../shared' |
7 | import { VIDEO_COMMENT_TEXT } from '../../../shared/forms/form-validators/video-comment' | 7 | import { VIDEO_COMMENT_TEXT } from '../../../shared/forms/form-validators/video-comment' |
8 | import { User } from '../../../shared/users' | ||
8 | import { Video } from '../../../shared/video/video.model' | 9 | import { Video } from '../../../shared/video/video.model' |
9 | import { VideoComment } from './video-comment.model' | 10 | import { VideoComment } from './video-comment.model' |
10 | import { VideoCommentService } from './video-comment.service' | 11 | import { 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 | }) |
17 | export class VideoCommentAddComponent extends FormReactive implements OnInit { | 18 | export 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) |