aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment.component.html
diff options
context:
space:
mode:
authorJulien Maulny <julien.maulny@protonmail.com>2019-11-15 19:05:08 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-12-04 09:36:45 +0100
commit69222afac8f8c41d90295b33f0695bbff352851e (patch)
tree63fe1faea94dd3bfc54e633631eecb275c969e54 /client/src/app/videos/+video-watch/comment/video-comment.component.html
parent69c7f7525ddf13b7ced787d8b72ac74b43665517 (diff)
downloadPeerTube-69222afac8f8c41d90295b33f0695bbff352851e.tar.gz
PeerTube-69222afac8f8c41d90295b33f0695bbff352851e.tar.zst
PeerTube-69222afac8f8c41d90295b33f0695bbff352851e.zip
Soft delete video comments instead of detroy
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comment.component.html')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.component.html47
1 files changed, 35 insertions, 12 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.html b/client/src/app/videos/+video-watch/comment/video-comment.component.html
index 60b803206..6ec35d63b 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.component.html
+++ b/client/src/app/videos/+video-watch/comment/video-comment.component.html
@@ -1,22 +1,45 @@
1<div class="root-comment"> 1<div class="root-comment">
2 <img [src]="comment.accountAvatarUrl" alt="Avatar" /> 2 <img
3 *ngIf="!comment.isDeleted"
4 class="comment-avatar"
5 [src]="comment.accountAvatarUrl"
6 alt="Avatar"
7 />
8
9 <span
10 *ngIf="comment.isDeleted"
11 class="comment-avatar"
12 ></span>
3 13
4 <div class="comment"> 14 <div class="comment">
5 <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div> 15 <ng-container *ngIf="!comment.isDeleted">
16 <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div>
6 17
7 <div class="comment-account-date"> 18 <div class="comment-account-date">
8 <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">{{ comment.by }}</a> 19 <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">{{ comment.by }}</a>
9 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date">{{ comment.createdAt | myFromNow }}</a> 20 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date">{{ comment.createdAt | myFromNow }}</a>
10 </div> 21 </div>
11 <div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div> 22 <div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div>
12 23
13 <div class="comment-actions"> 24 <div class="comment-actions">
14 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div> 25 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
15 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div> 26 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div>
16 </div> 27 </div>
28 </ng-container>
29
30 <ng-container *ngIf="comment.isDeleted">
31 <div class="comment-account-date">
32 <span class="comment-account" i18n>Deleted</span>
33 <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date">{{ comment.createdAt | myFromNow }}</a>
34 </div>
35
36 <div *ngIf="comment.isDeleted" class="comment-html comment-html-deleted">
37 <i i18n>This comment has been deleted</i>
38 </div>
39 </ng-container>
17 40
18 <my-video-comment-add 41 <my-video-comment-add
19 *ngIf="isUserLoggedIn() && inReplyToCommentId === comment.id" 42 *ngIf="!comment.isDeleted && isUserLoggedIn() && inReplyToCommentId === comment.id"
20 [user]="user" 43 [user]="user"
21 [video]="video" 44 [video]="video"
22 [parentComment]="comment" 45 [parentComment]="comment"