blob: 831ea0521a94332c2a9903c5e95c736a4b05a8a2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<div class="root-comment">
<img [src]="getAvatarUrl(comment.account)" alt="Avatar" />
<div class="comment">
<div *ngIf="highlightedComment === true" class="highlighted-comment">Highlighted comment</div>
<div class="comment-account-date">
<a target="_blank" [href]="comment.account.url" class="comment-account">{{ comment.by }}</a>
<a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date">{{ comment.createdAt | myFromNow }}</a>
</div>
<div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div>
<div class="comment-actions">
<div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply">Reply</div>
<div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete">Delete</div>
</div>
<my-video-comment-add
*ngIf="isUserLoggedIn() && inReplyToCommentId === comment.id"
[user]="user"
[video]="video"
[parentComment]="comment"
[parentComments]="newParentComments"
[focusOnInit]="true"
(commentCreated)="onCommentReplyCreated($event)"
></my-video-comment-add>
<div *ngIf="commentTree" class="children">
<div *ngFor="let commentChild of commentTree.children">
<my-video-comment
[comment]="commentChild.comment"
[video]="video"
[inReplyToCommentId]="inReplyToCommentId"
[commentTree]="commentChild"
[parentComments]="newParentComments"
(wantedToReply)="onWantToReply($event)"
(wantedToDelete)="onWantToDelete($event)"
(resetReply)="onResetReply()"
></my-video-comment>
</div>
</div>
</div>
</div>
|