]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/comment/video-comment.component.html
df996533d8eb1f352ca860d96cb4c0a06c0dce32
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment.component.html
1 <div class="root-comment">
2 <div class="left">
3 <a *ngIf="!comment.isDeleted" [href]="comment.account.url" target="_blank" rel="noopener noreferrer">
4 <img
5 class="comment-avatar"
6 [src]="comment.accountAvatarUrl"
7 alt="Avatar"
8 />
9 </a>
10
11 <div class="vertical-border"></div>
12 </div>
13
14 <div class="right">
15 <span *ngIf="comment.isDeleted" class="comment-avatar"></span>
16
17 <div class="comment">
18 <ng-container *ngIf="!comment.isDeleted">
19 <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div>
20
21 <div class="comment-account-date">
22 <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">{{ comment.by }}</a>
23 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
24 class="comment-date">{{ comment.createdAt | myFromNow }}</a>
25 </div>
26 <div
27 class="comment-html"
28 [innerHTML]="sanitizedCommentHTML"
29 (timestampClicked)="handleTimestampClicked($event)"
30 timestampRouteTransformer
31 ></div>
32
33 <div class="comment-actions">
34 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
35 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div>
36 </div>
37 </ng-container>
38
39 <ng-container *ngIf="comment.isDeleted">
40 <div class="comment-account-date">
41 <span class="comment-account" i18n>Deleted</span>
42 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
43 class="comment-date">{{ comment.createdAt | myFromNow }}</a>
44 </div>
45
46 <div *ngIf="comment.isDeleted" class="comment-html comment-html-deleted">
47 <i i18n>This comment has been deleted</i>
48 </div>
49 </ng-container>
50
51 <my-video-comment-add
52 *ngIf="!comment.isDeleted && isUserLoggedIn() && inReplyToCommentId === comment.id"
53 [user]="user"
54 [video]="video"
55 [parentComment]="comment"
56 [parentComments]="newParentComments"
57 [focusOnInit]="true"
58 (commentCreated)="onCommentReplyCreated($event)"
59 (cancel)="onResetReply()"
60 ></my-video-comment-add>
61
62 <div *ngIf="commentTree" class="children">
63 <div *ngFor="let commentChild of commentTree.children">
64 <my-video-comment
65 [comment]="commentChild.comment"
66 [video]="video"
67 [inReplyToCommentId]="inReplyToCommentId"
68 [commentTree]="commentChild"
69 [parentComments]="newParentComments"
70 (wantedToReply)="onWantToReply($event)"
71 (wantedToDelete)="onWantToDelete($event)"
72 (resetReply)="onResetReply()"
73 (timestampClicked)="handleTimestampClicked($event)"
74 ></my-video-comment>
75 </div>
76 </div>
77 </div>
78 </div>
79 </div>