]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/comment/video-comment.component.html
Refactor comment add css
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / comment / video-comment.component.html
CommitLineData
9d6b9d10 1<div *ngIf="isCommentDisplayed()" class="root-comment">
fc641ded 2 <div class="left">
126a6352 3 <my-account-avatar *ngIf="!comment.isDeleted" [href]="comment.account.url" [account]="comment.account"></my-account-avatar>
fc641ded
C
4 <div class="vertical-border"></div>
5 </div>
4635f59d 6
c62a34d3 7 <div class="right" [ngClass]="{ 'mb-3': firstInThread }">
fc641ded 8 <span *ngIf="comment.isDeleted" class="comment-avatar"></span>
1263fc4e 9
fc641ded
C
10 <div class="comment">
11 <ng-container *ngIf="!comment.isDeleted">
12 <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div>
cf117aaa 13
fc641ded 14 <div class="comment-account-date">
83e9886e 15 <div class="comment-account">
d07b2944
C
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>
83e9886e 20
d07b2944
C
21 <span class="comment-account-fid ml-1">{{ comment.by }}</span>
22 </a>
83e9886e 23 </div>
d07b2944
C
24
25 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date" [title]="comment.createdAt">
26 {{ comment.createdAt | myFromNow }}
27 </a>
fc641ded 28 </div>
d07b2944 29
b29bf61d
RK
30 <div
31 class="comment-html"
32 [innerHTML]="sanitizedCommentHTML"
33 (timestampClicked)="handleTimestampClicked($event)"
34 timestampRouteTransformer
35 ></div>
69222afa 36
fc641ded 37 <div class="comment-actions">
45ae994a 38 <div *ngIf="isUserLoggedIn()" tabindex=0 (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
218b0874 39
edf1a4e5 40 <my-user-moderation-dropdown
fe88ca69 41 [prependActions]="prependModerationActions" tabindex=0 [buttonStyled]="false"
218b0874 42 buttonSize="small" [account]="commentAccount" [user]="commentUser" i18n-label label="Options" placement="bottom-left auto"
edf1a4e5 43 ></my-user-moderation-dropdown>
fc641ded
C
44 </div>
45 </ng-container>
69222afa 46
fc641ded
C
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
09f8f73f 54 <div class="comment-html comment-html-deleted">
fc641ded
C
55 <i i18n>This comment has been deleted</i>
56 </div>
57 </ng-container>
4635f59d 58
fc641ded
C
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)"
88adad2d 67 (cancel)="onResetReply()"
f63c03fb 68 [textValue]="redraftValue"
fc641ded 69 ></my-video-comment-add>
4635f59d 70
fc641ded
C
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)"
f63c03fb 81 (wantedToRedraft)="onWantToRedraft($event)"
fc641ded 82 (resetReply)="onResetReply()"
b29bf61d 83 (timestampClicked)="handleTimestampClicked($event)"
f63c03fb 84 [redraftValue]="redraftValue"
fc641ded
C
85 ></my-video-comment>
86 </div>
cf117aaa 87 </div>
c62a34d3 88
218b0874
C
89 <ng-content></ng-content>
90 </div>
4635f59d
C
91 </div>
92</div>
8ca56654
C
93
94<ng-container *ngIf="prependModerationActions">
95 <my-comment-report #commentReportModal [comment]="comment"></my-comment-report>
96</ng-container>