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