aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment.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.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.component.ts')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.component.ts11
1 files changed, 10 insertions, 1 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 5af6e3335..b305c639a 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
@@ -1,6 +1,8 @@
1import { Component, EventEmitter, Input, Output } from '@angular/core' 1import { Component, EventEmitter, Input, Output } from '@angular/core'
2import { Account as AccountInterface } from '../../../../../../shared/models/actors'
2import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' 3import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model'
3import { AuthService } from '../../../core/auth' 4import { AuthService } from '../../../core/auth'
5import { Account } from '../../../shared/account/account.model'
4import { Video } from '../../../shared/video/video.model' 6import { Video } from '../../../shared/video/video.model'
5import { VideoComment } from './video-comment.model' 7import { VideoComment } from './video-comment.model'
6 8
@@ -18,7 +20,10 @@ export class VideoCommentComponent {
18 @Output() wantedToReply = new EventEmitter<VideoComment>() 20 @Output() wantedToReply = new EventEmitter<VideoComment>()
19 @Output() resetReply = new EventEmitter() 21 @Output() resetReply = new EventEmitter()
20 22
21 constructor (private authService: AuthService) { 23 constructor (private authService: AuthService) {}
24
25 get user () {
26 return this.authService.getUser()
22 } 27 }
23 28
24 onCommentReplyCreated (createdComment: VideoComment) { 29 onCommentReplyCreated (createdComment: VideoComment) {
@@ -52,4 +57,8 @@ export class VideoCommentComponent {
52 onResetReply () { 57 onResetReply () {
53 this.resetReply.emit() 58 this.resetReply.emit()
54 } 59 }
60
61 getAvatarUrl (account: AccountInterface) {
62 return Account.GET_ACCOUNT_AVATAR_URL(account)
63 }
55} 64}