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