]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-watch/comment/video-comment.component.html
Add delete & re-draft for comments without replies
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / comment / video-comment.component.html
index f02ea549a86089778c17784f60ee83f1780f6387..fdb555d18e88df4c1ff07e588826d8e0be223dcd 100644 (file)
@@ -1,4 +1,4 @@
-<div class="root-comment">
+<div *ngIf="!comment.isDeleted || comment.isDeleted && comment.totalReplies !== 0" class="root-comment">
   <div class="left">
     <a *ngIf="!comment.isDeleted" [href]="comment.account.url" target="_blank" rel="noopener noreferrer">
       <img
@@ -43,6 +43,7 @@
         <div class="comment-actions">
           <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
           <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div>
+          <div *ngIf="isRedraftableByUser()" (click)="onWantToRedraft()" class="comment-action-redraft" i18n>Delete & re-draft</div>
 
           <my-user-moderation-dropdown
             [prependActions]="prependModerationActions"
@@ -58,7 +59,7 @@
              class="comment-date">{{ comment.createdAt | myFromNow }}</a>
         </div>
 
-        <div *ngIf="comment.isDeleted" class="comment-html comment-html-deleted">
+        <div class="comment-html comment-html-deleted">
           <i i18n>This comment has been deleted</i>
         </div>
       </ng-container>
@@ -72,6 +73,7 @@
         [focusOnInit]="true"
         (commentCreated)="onCommentReplyCreated($event)"
         (cancel)="onResetReply()"
+        [textValue]="redraftValue"
       ></my-video-comment-add>
 
       <div *ngIf="commentTree" class="children">
             [parentComments]="newParentComments"
             (wantedToReply)="onWantToReply($event)"
             (wantedToDelete)="onWantToDelete($event)"
+            (wantedToRedraft)="onWantToRedraft($event)"
             (resetReply)="onResetReply()"
             (timestampClicked)="handleTimestampClicked($event)"
+            [redraftValue]="redraftValue"
           ></my-video-comment>
         </div>
       </div>