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.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.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comment.component.ts | 11 |
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 @@ | |||
1 | import { Component, EventEmitter, Input, Output } from '@angular/core' | 1 | import { Component, EventEmitter, Input, Output } from '@angular/core' |
2 | import { Account as AccountInterface } from '../../../../../../shared/models/actors' | ||
2 | import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' | 3 | import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model' |
3 | import { AuthService } from '../../../core/auth' | 4 | import { AuthService } from '../../../core/auth' |
5 | import { Account } from '../../../shared/account/account.model' | ||
4 | import { Video } from '../../../shared/video/video.model' | 6 | import { Video } from '../../../shared/video/video.model' |
5 | import { VideoComment } from './video-comment.model' | 7 | import { 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 | } |