]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/comment/video-comment.component.html
Merge branch 'release/2.3.0' into develop
[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"
c511c3f0 7 (error)="switchToDefaultAvatar($event)"
a0dedc02
RK
8 alt="Avatar"
9 />
10 </a>
69222afa 11
fc641ded
C
12 <div class="vertical-border"></div>
13 </div>
4635f59d 14
c62a34d3 15 <div class="right" [ngClass]="{ 'mb-3': firstInThread }">
fc641ded 16 <span *ngIf="comment.isDeleted" class="comment-avatar"></span>
1263fc4e 17
fc641ded
C
18 <div class="comment">
19 <ng-container *ngIf="!comment.isDeleted">
20 <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div>
cf117aaa 21
fc641ded 22 <div class="comment-account-date">
83e9886e
C
23 <div class="comment-account">
24 <a
25 [routerLink]="[ '/accounts', comment.by ]"
26 class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }"
27 >
28 {{ comment.account.displayName }}
29 </a>
30
31 <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account-fid ml-1">{{ comment.by }}</a>
32 </div>
fc641ded 33 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
5dfb7c1d 34 class="comment-date" [title]="comment.createdAt">{{ comment.createdAt | myFromNow }}</a>
fc641ded 35 </div>
b29bf61d
RK
36 <div
37 class="comment-html"
38 [innerHTML]="sanitizedCommentHTML"
39 (timestampClicked)="handleTimestampClicked($event)"
40 timestampRouteTransformer
41 ></div>
69222afa 42
fc641ded
C
43 <div class="comment-actions">
44 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
45 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div>
218b0874 46
edf1a4e5 47 <my-user-moderation-dropdown
8ca56654 48 [prependActions]="prependModerationActions"
218b0874 49 buttonSize="small" [account]="commentAccount" [user]="commentUser" i18n-label label="Options" placement="bottom-left auto"
edf1a4e5 50 ></my-user-moderation-dropdown>
fc641ded
C
51 </div>
52 </ng-container>
69222afa 53
fc641ded
C
54 <ng-container *ngIf="comment.isDeleted">
55 <div class="comment-account-date">
56 <span class="comment-account" i18n>Deleted</span>
57 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
58 class="comment-date">{{ comment.createdAt | myFromNow }}</a>
59 </div>
60
61 <div *ngIf="comment.isDeleted" class="comment-html comment-html-deleted">
62 <i i18n>This comment has been deleted</i>
63 </div>
64 </ng-container>
4635f59d 65
fc641ded
C
66 <my-video-comment-add
67 *ngIf="!comment.isDeleted && isUserLoggedIn() && inReplyToCommentId === comment.id"
68 [user]="user"
69 [video]="video"
70 [parentComment]="comment"
71 [parentComments]="newParentComments"
72 [focusOnInit]="true"
73 (commentCreated)="onCommentReplyCreated($event)"
88adad2d 74 (cancel)="onResetReply()"
fc641ded 75 ></my-video-comment-add>
4635f59d 76
fc641ded
C
77 <div *ngIf="commentTree" class="children">
78 <div *ngFor="let commentChild of commentTree.children">
79 <my-video-comment
80 [comment]="commentChild.comment"
81 [video]="video"
82 [inReplyToCommentId]="inReplyToCommentId"
83 [commentTree]="commentChild"
84 [parentComments]="newParentComments"
85 (wantedToReply)="onWantToReply($event)"
86 (wantedToDelete)="onWantToDelete($event)"
87 (resetReply)="onResetReply()"
b29bf61d 88 (timestampClicked)="handleTimestampClicked($event)"
fc641ded
C
89 ></my-video-comment>
90 </div>
cf117aaa 91 </div>
c62a34d3 92
218b0874
C
93 <ng-content></ng-content>
94 </div>
4635f59d
C
95 </div>
96</div>
8ca56654
C
97
98<ng-container *ngIf="prependModerationActions">
99 <my-comment-report #commentReportModal [comment]="comment"></my-comment-report>
100</ng-container>