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