]>
Commit | Line | Data |
---|---|---|
746018f6 | 1 | <div *ngIf="isCommentDisplayed()" class="root-comment" [ngClass]="{ 'is-child': isChild() }"> |
fc641ded | 2 | <div class="left"> |
746018f6 | 3 | <my-actor-avatar *ngIf="!comment.isDeleted" [href]="comment.account.url" [account]="comment.account"></my-actor-avatar> |
fc641ded C |
4 | <div class="vertical-border"></div> |
5 | </div> | |
4635f59d | 6 | |
c62a34d3 | 7 | <div class="right" [ngClass]="{ 'mb-3': firstInThread }"> |
fc641ded C |
8 | <div class="comment"> |
9 | <ng-container *ngIf="!comment.isDeleted"> | |
10 | <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div> | |
cf117aaa | 11 | |
fc641ded | 12 | <div class="comment-account-date"> |
83e9886e | 13 | <div class="comment-account"> |
71887396 | 14 | <a [routerLink]="[ '/a', comment.by ]"> |
d07b2944 C |
15 | <span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }"> |
16 | {{ comment.account.displayName }} | |
17 | </span> | |
83e9886e | 18 | |
d07b2944 C |
19 | <span class="comment-account-fid ml-1">{{ comment.by }}</span> |
20 | </a> | |
83e9886e | 21 | </div> |
d07b2944 | 22 | |
d4a8e7a6 | 23 | <a [routerLink]="['/w', video.shortUUID, { 'threadId': comment.threadId }]" class="comment-date" [title]="comment.createdAt"> |
d07b2944 C |
24 | {{ comment.createdAt | myFromNow }} |
25 | </a> | |
fc641ded | 26 | </div> |
d07b2944 | 27 | |
b29bf61d RK |
28 | <div |
29 | class="comment-html" | |
30 | [innerHTML]="sanitizedCommentHTML" | |
31 | (timestampClicked)="handleTimestampClicked($event)" | |
32 | timestampRouteTransformer | |
33 | ></div> | |
69222afa | 34 | |
fc641ded | 35 | <div class="comment-actions"> |
53c6b2b4 | 36 | <div tabindex=0 (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div> |
218b0874 | 37 | |
edf1a4e5 | 38 | <my-user-moderation-dropdown |
fe88ca69 | 39 | [prependActions]="prependModerationActions" tabindex=0 [buttonStyled]="false" |
218b0874 | 40 | buttonSize="small" [account]="commentAccount" [user]="commentUser" i18n-label label="Options" placement="bottom-left auto" |
edf1a4e5 | 41 | ></my-user-moderation-dropdown> |
fc641ded C |
42 | </div> |
43 | </ng-container> | |
69222afa | 44 | |
fc641ded C |
45 | <ng-container *ngIf="comment.isDeleted"> |
46 | <div class="comment-account-date"> | |
47 | <span class="comment-account" i18n>Deleted</span> | |
d4a8e7a6 | 48 | <a [routerLink]="['/w', video.shortUUID, { 'threadId': comment.threadId }]" |
fc641ded C |
49 | class="comment-date">{{ comment.createdAt | myFromNow }}</a> |
50 | </div> | |
51 | ||
09f8f73f | 52 | <div class="comment-html comment-html-deleted"> |
fc641ded C |
53 | <i i18n>This comment has been deleted</i> |
54 | </div> | |
55 | </ng-container> | |
4635f59d | 56 | |
fc641ded | 57 | <my-video-comment-add |
53c6b2b4 | 58 | *ngIf="!comment.isDeleted && inReplyToCommentId === comment.id" |
fc641ded C |
59 | [user]="user" |
60 | [video]="video" | |
61 | [parentComment]="comment" | |
62 | [parentComments]="newParentComments" | |
63 | [focusOnInit]="true" | |
64 | (commentCreated)="onCommentReplyCreated($event)" | |
88adad2d | 65 | (cancel)="onResetReply()" |
f63c03fb | 66 | [textValue]="redraftValue" |
fc641ded | 67 | ></my-video-comment-add> |
4635f59d | 68 | |
746018f6 | 69 | <div *ngIf="commentTree"> |
fc641ded C |
70 | <div *ngFor="let commentChild of commentTree.children"> |
71 | <my-video-comment | |
72 | [comment]="commentChild.comment" | |
73 | [video]="video" | |
74 | [inReplyToCommentId]="inReplyToCommentId" | |
75 | [commentTree]="commentChild" | |
76 | [parentComments]="newParentComments" | |
77 | (wantedToReply)="onWantToReply($event)" | |
78 | (wantedToDelete)="onWantToDelete($event)" | |
f63c03fb | 79 | (wantedToRedraft)="onWantToRedraft($event)" |
fc641ded | 80 | (resetReply)="onResetReply()" |
b29bf61d | 81 | (timestampClicked)="handleTimestampClicked($event)" |
f63c03fb | 82 | [redraftValue]="redraftValue" |
fc641ded C |
83 | ></my-video-comment> |
84 | </div> | |
cf117aaa | 85 | </div> |
c62a34d3 | 86 | |
218b0874 C |
87 | <ng-content></ng-content> |
88 | </div> | |
4635f59d C |
89 | </div> |
90 | </div> | |
8ca56654 C |
91 | |
92 | <ng-container *ngIf="prependModerationActions"> | |
93 | <my-comment-report #commentReportModal [comment]="comment"></my-comment-report> | |
94 | </ng-container> |