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