]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/comment/video-comment.component.html
Implement remote interaction
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / comment / video-comment.component.html
CommitLineData
fdd12965 1<div *ngIf="isNotDeletedOrDeletedWithReplies()" 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 23 <div class="comment-account">
d07b2944
C
24 <a [routerLink]="[ '/accounts', comment.by ]">
25 <span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }">
26 {{ comment.account.displayName }}
27 </span>
83e9886e 28
d07b2944
C
29 <span class="comment-account-fid ml-1">{{ comment.by }}</span>
30 </a>
83e9886e 31 </div>
d07b2944
C
32
33 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date" [title]="comment.createdAt">
34 {{ comment.createdAt | myFromNow }}
35 </a>
fc641ded 36 </div>
d07b2944 37
b29bf61d
RK
38 <div
39 class="comment-html"
40 [innerHTML]="sanitizedCommentHTML"
41 (timestampClicked)="handleTimestampClicked($event)"
42 timestampRouteTransformer
43 ></div>
69222afa 44
fc641ded 45 <div class="comment-actions">
45ae994a 46 <div *ngIf="isUserLoggedIn()" tabindex=0 (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
218b0874 47
edf1a4e5 48 <my-user-moderation-dropdown
45ae994a 49 [prependActions]="prependModerationActions" tabindex=0
218b0874 50 buttonSize="small" [account]="commentAccount" [user]="commentUser" i18n-label label="Options" placement="bottom-left auto"
edf1a4e5 51 ></my-user-moderation-dropdown>
fc641ded
C
52 </div>
53 </ng-container>
69222afa 54
fc641ded
C
55 <ng-container *ngIf="comment.isDeleted">
56 <div class="comment-account-date">
57 <span class="comment-account" i18n>Deleted</span>
58 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
59 class="comment-date">{{ comment.createdAt | myFromNow }}</a>
60 </div>
61
09f8f73f 62 <div class="comment-html comment-html-deleted">
fc641ded
C
63 <i i18n>This comment has been deleted</i>
64 </div>
65 </ng-container>
4635f59d 66
fc641ded
C
67 <my-video-comment-add
68 *ngIf="!comment.isDeleted && isUserLoggedIn() && inReplyToCommentId === comment.id"
69 [user]="user"
70 [video]="video"
71 [parentComment]="comment"
72 [parentComments]="newParentComments"
73 [focusOnInit]="true"
74 (commentCreated)="onCommentReplyCreated($event)"
88adad2d 75 (cancel)="onResetReply()"
f63c03fb 76 [textValue]="redraftValue"
fc641ded 77 ></my-video-comment-add>
4635f59d 78
fc641ded
C
79 <div *ngIf="commentTree" class="children">
80 <div *ngFor="let commentChild of commentTree.children">
81 <my-video-comment
82 [comment]="commentChild.comment"
83 [video]="video"
84 [inReplyToCommentId]="inReplyToCommentId"
85 [commentTree]="commentChild"
86 [parentComments]="newParentComments"
87 (wantedToReply)="onWantToReply($event)"
88 (wantedToDelete)="onWantToDelete($event)"
f63c03fb 89 (wantedToRedraft)="onWantToRedraft($event)"
fc641ded 90 (resetReply)="onResetReply()"
b29bf61d 91 (timestampClicked)="handleTimestampClicked($event)"
f63c03fb 92 [redraftValue]="redraftValue"
fc641ded
C
93 ></my-video-comment>
94 </div>
cf117aaa 95 </div>
c62a34d3 96
218b0874
C
97 <ng-content></ng-content>
98 </div>
4635f59d
C
99 </div>
100</div>
8ca56654
C
101
102<ng-container *ngIf="prependModerationActions">
103 <my-comment-report #commentReportModal [comment]="comment"></my-comment-report>
104</ng-container>