]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/comment/video-comment.component.html
Provide native links for description timestamps, and re-clickability for these
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment.component.html
CommitLineData
cf117aaa 1<div class="root-comment">
fc641ded 2 <div class="left">
a0dedc02
RK
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>
69222afa 10
fc641ded
C
11 <div class="vertical-border"></div>
12 </div>
4635f59d 13
fc641ded
C
14 <div class="right">
15 <span *ngIf="comment.isDeleted" class="comment-avatar"></span>
1263fc4e 16
fc641ded
C
17 <div class="comment">
18 <ng-container *ngIf="!comment.isDeleted">
19 <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div>
cf117aaa 20
fc641ded
C
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>
b29bf61d
RK
26 <div
27 class="comment-html"
28 [innerHTML]="sanitizedCommentHTML"
29 (timestampClicked)="handleTimestampClicked($event)"
30 timestampRouteTransformer
31 ></div>
69222afa 32
fc641ded
C
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>
69222afa 38
fc641ded
C
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>
4635f59d 50
fc641ded
C
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)"
88adad2d 59 (cancel)="onResetReply()"
fc641ded 60 ></my-video-comment-add>
4635f59d 61
fc641ded
C
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()"
b29bf61d 73 (timestampClicked)="handleTimestampClicked($event)"
fc641ded
C
74 ></my-video-comment>
75 </div>
cf117aaa 76 </div>
4635f59d
C
77 </div>
78 </div>
79</div>