]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/comment/video-comment.component.html
Add commentor name alongside fid for video comments
[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 21 <div class="comment-account-date">
5dfb7c1d
RK
22 <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">
23 <span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }">{{ comment.account.displayName }}</span>
24 <span class="comment-account-fid ml-1">{{ comment.by }}</span>
25 </a>
fc641ded 26 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
5dfb7c1d 27 class="comment-date" [title]="comment.createdAt">{{ comment.createdAt | myFromNow }}</a>
fc641ded 28 </div>
b29bf61d
RK
29 <div
30 class="comment-html"
31 [innerHTML]="sanitizedCommentHTML"
32 (timestampClicked)="handleTimestampClicked($event)"
33 timestampRouteTransformer
34 ></div>
69222afa 35
fc641ded
C
36 <div class="comment-actions">
37 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
38 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div>
39 </div>
40 </ng-container>
69222afa 41
fc641ded
C
42 <ng-container *ngIf="comment.isDeleted">
43 <div class="comment-account-date">
44 <span class="comment-account" i18n>Deleted</span>
45 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
46 class="comment-date">{{ comment.createdAt | myFromNow }}</a>
47 </div>
48
49 <div *ngIf="comment.isDeleted" class="comment-html comment-html-deleted">
50 <i i18n>This comment has been deleted</i>
51 </div>
52 </ng-container>
4635f59d 53
fc641ded
C
54 <my-video-comment-add
55 *ngIf="!comment.isDeleted && isUserLoggedIn() && inReplyToCommentId === comment.id"
56 [user]="user"
57 [video]="video"
58 [parentComment]="comment"
59 [parentComments]="newParentComments"
60 [focusOnInit]="true"
61 (commentCreated)="onCommentReplyCreated($event)"
88adad2d 62 (cancel)="onResetReply()"
fc641ded 63 ></my-video-comment-add>
4635f59d 64
fc641ded
C
65 <div *ngIf="commentTree" class="children">
66 <div *ngFor="let commentChild of commentTree.children">
67 <my-video-comment
68 [comment]="commentChild.comment"
69 [video]="video"
70 [inReplyToCommentId]="inReplyToCommentId"
71 [commentTree]="commentChild"
72 [parentComments]="newParentComments"
73 (wantedToReply)="onWantToReply($event)"
74 (wantedToDelete)="onWantToDelete($event)"
75 (resetReply)="onResetReply()"
b29bf61d 76 (timestampClicked)="handleTimestampClicked($event)"
fc641ded
C
77 ></my-video-comment>
78 </div>
cf117aaa 79 </div>
4635f59d
C
80 </div>
81 </div>
82</div>