]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/comment/video-comment.component.html
Improve comment highlighting
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment.component.html
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 target="_blank" [href]="comment.account.url" class="comment-account">{{ comment.by }}</a>
9 <a [routerLink]="['/videos/watch', video.uuid, { 'commentId': comment.id }]" 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>