]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - 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
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">
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>
26 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
27 class="comment-date" [title]="comment.createdAt">{{ comment.createdAt | myFromNow }}</a>
28 </div>
29 <div
30 class="comment-html"
31 [innerHTML]="sanitizedCommentHTML"
32 (timestampClicked)="handleTimestampClicked($event)"
33 timestampRouteTransformer
34 ></div>
35
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>
41
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>
53
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)"
62 (cancel)="onResetReply()"
63 ></my-video-comment-add>
64
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()"
76 (timestampClicked)="handleTimestampClicked($event)"
77 ></my-video-comment>
78 </div>
79 </div>
80 </div>
81 </div>
82 </div>