]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/comment/video-comment.component.html
Issue #168: youtube-like marking of comments (#297)
[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 <span class="marked-comment" *ngIf="comment.marked">Marked comment</span>
6 <div class="comment-account-date">
7 <a target="_blank" [href]="comment.account.url" class="comment-account">{{ comment.by }}</a>
8 <a [routerLink]="['/videos/watch', video.uuid, 'comment', comment.id]" class="comment-date">{{ comment.createdAt | myFromNow }}</a>
9 </div>
10 <div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div>
11
12 <div class="comment-actions">
13 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply">Reply</div>
14 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete">Delete</div>
15 </div>
16
17 <my-video-comment-add
18 *ngIf="isUserLoggedIn() && inReplyToCommentId === comment.id"
19 [user]="user"
20 [video]="video"
21 [parentComment]="comment"
22 [parentComments]="newParentComments"
23 [focusOnInit]="true"
24 (commentCreated)="onCommentReplyCreated($event)"
25 ></my-video-comment-add>
26
27 <div *ngIf="commentTree" class="children">
28 <div *ngFor="let commentChild of commentTree.children">
29 <my-video-comment
30 [comment]="commentChild.comment"
31 [video]="video"
32 [inReplyToCommentId]="inReplyToCommentId"
33 [commentTree]="commentChild"
34 [parentComments]="newParentComments"
35 (wantedToReply)="onWantToReply($event)"
36 (wantedToDelete)="onWantToDelete($event)"
37 (resetReply)="onResetReply()"
38 ></my-video-comment>
39 </div>
40 </div>
41 </div>
42 </div>