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