]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/comment/video-comment.component.html
Add user moderation dropdown to comments
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment.component.html
CommitLineData
cf117aaa 1<div class="root-comment">
fc641ded 2 <div class="left">
a0dedc02
RK
3 <a *ngIf="!comment.isDeleted" [href]="comment.account.url" target="_blank" rel="noopener noreferrer">
4 <img
5 class="comment-avatar"
6 [src]="comment.accountAvatarUrl"
7 alt="Avatar"
8 />
9 </a>
69222afa 10
fc641ded
C
11 <div class="vertical-border"></div>
12 </div>
4635f59d 13
fc641ded
C
14 <div class="right">
15 <span *ngIf="comment.isDeleted" class="comment-avatar"></span>
1263fc4e 16
fc641ded
C
17 <div class="comment">
18 <ng-container *ngIf="!comment.isDeleted">
19 <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div>
cf117aaa 20
fc641ded 21 <div class="comment-account-date">
5dfb7c1d
RK
22 <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">
23 <span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }">{{ comment.account.displayName }}</span>
24 <span class="comment-account-fid ml-1">{{ comment.by }}</span>
25 </a>
fc641ded 26 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
5dfb7c1d 27 class="comment-date" [title]="comment.createdAt">{{ comment.createdAt | myFromNow }}</a>
fc641ded 28 </div>
b29bf61d
RK
29 <div
30 class="comment-html"
31 [innerHTML]="sanitizedCommentHTML"
32 (timestampClicked)="handleTimestampClicked($event)"
33 timestampRouteTransformer
34 ></div>
69222afa 35
fc641ded
C
36 <div class="comment-actions">
37 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
38 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div>
edf1a4e5
RK
39 <my-user-moderation-dropdown
40 buttonSize="small" [account]="commentAccount" [user]="commentUser" label="Options" placement="bottom-left auto"
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>
48 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
49 class="comment-date">{{ comment.createdAt | myFromNow }}</a>
50 </div>
51
52 <div *ngIf="comment.isDeleted" class="comment-html comment-html-deleted">
53 <i i18n>This comment has been deleted</i>
54 </div>
55 </ng-container>
4635f59d 56
fc641ded
C
57 <my-video-comment-add
58 *ngIf="!comment.isDeleted && isUserLoggedIn() && inReplyToCommentId === comment.id"
59 [user]="user"
60 [video]="video"
61 [parentComment]="comment"
62 [parentComments]="newParentComments"
63 [focusOnInit]="true"
64 (commentCreated)="onCommentReplyCreated($event)"
88adad2d 65 (cancel)="onResetReply()"
fc641ded 66 ></my-video-comment-add>
4635f59d 67
fc641ded
C
68 <div *ngIf="commentTree" class="children">
69 <div *ngFor="let commentChild of commentTree.children">
70 <my-video-comment
71 [comment]="commentChild.comment"
72 [video]="video"
73 [inReplyToCommentId]="inReplyToCommentId"
74 [commentTree]="commentChild"
75 [parentComments]="newParentComments"
76 (wantedToReply)="onWantToReply($event)"
77 (wantedToDelete)="onWantToDelete($event)"
78 (resetReply)="onResetReply()"
b29bf61d 79 (timestampClicked)="handleTimestampClicked($event)"
fc641ded
C
80 ></my-video-comment>
81 </div>
cf117aaa 82 </div>
4635f59d
C
83 </div>
84 </div>
85</div>