]>
Commit | Line | Data |
---|---|---|
1 | <div *ngIf="isCommentDisplayed()" class="root-comment" [ngClass]="{ 'is-child': isChild() }"> | |
2 | <div class="left"> | |
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 | ||
8 | <div class="vertical-border"></div> | |
9 | </div> | |
10 | ||
11 | <div class="right" [ngClass]="{ 'mb-3': firstInThread }"> | |
12 | <div class="comment"> | |
13 | <ng-container *ngIf="!comment.isDeleted"> | |
14 | <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div> | |
15 | ||
16 | <div class="comment-account-date"> | |
17 | <div class="comment-account"> | |
18 | <a [routerLink]="[ '/a', comment.by ]"> | |
19 | <span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }"> | |
20 | {{ comment.account.displayName }} | |
21 | </span> | |
22 | ||
23 | <span class="comment-account-fid ms-1">{{ comment.by }}</span> | |
24 | </a> | |
25 | </div> | |
26 | ||
27 | <a [routerLink]="['/w', video.shortUUID, { 'threadId': comment.threadId }]" class="comment-date" [title]="comment.createdAt"> | |
28 | {{ comment.createdAt | myFromNow }} | |
29 | </a> | |
30 | </div> | |
31 | ||
32 | <div | |
33 | class="comment-html" | |
34 | [innerHTML]="sanitizedCommentHTML" | |
35 | (timestampClicked)="handleTimestampClicked($event)" | |
36 | myTimestampRouteTransformer | |
37 | ></div> | |
38 | ||
39 | <div class="comment-actions"> | |
40 | <button (click)="onWantToReply()" class="comment-action-reply border-0 p-0" i18n>Reply</button> | |
41 | ||
42 | <my-user-moderation-dropdown | |
43 | [prependActions]="prependModerationActions" [buttonStyled]="false" | |
44 | buttonSize="small" [account]="commentAccount" [user]="commentUser" i18n-label label="Options" placement="bottom-left auto" | |
45 | ></my-user-moderation-dropdown> | |
46 | </div> | |
47 | </ng-container> | |
48 | ||
49 | <ng-container *ngIf="comment.isDeleted"> | |
50 | <div class="comment-account-date"> | |
51 | <span class="comment-account" i18n>Deleted</span> | |
52 | <a [routerLink]="['/w', video.shortUUID, { 'threadId': comment.threadId }]" | |
53 | class="comment-date">{{ comment.createdAt | myFromNow }}</a> | |
54 | </div> | |
55 | ||
56 | <div class="comment-html comment-html-deleted"> | |
57 | <i i18n>This comment has been deleted</i> | |
58 | </div> | |
59 | </ng-container> | |
60 | ||
61 | <my-video-comment-add | |
62 | *ngIf="!comment.isDeleted && inReplyToCommentId === comment.id" | |
63 | [user]="user" | |
64 | [video]="video" | |
65 | [parentComment]="comment" | |
66 | [parentComments]="newParentComments" | |
67 | [focusOnInit]="true" | |
68 | (commentCreated)="onCommentReplyCreated($event)" | |
69 | (cancel)="onResetReply()" | |
70 | [textValue]="redraftValue" | |
71 | ></my-video-comment-add> | |
72 | ||
73 | <div *ngIf="commentTree"> | |
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)" | |
83 | (wantedToRedraft)="onWantToRedraft($event)" | |
84 | (resetReply)="onResetReply()" | |
85 | (timestampClicked)="handleTimestampClicked($event)" | |
86 | [redraftValue]="redraftValue" | |
87 | ></my-video-comment> | |
88 | </div> | |
89 | </div> | |
90 | ||
91 | <ng-content></ng-content> | |
92 | </div> | |
93 | </div> | |
94 | </div> | |
95 | ||
96 | <ng-container *ngIf="prependModerationActions"> | |
97 | <my-comment-report #commentReportModal [comment]="comment"></my-comment-report> | |
98 | </ng-container> |