]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-watch/comment/video-comment.component.html
add link to open video on origin instance
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / comment / video-comment.component.html
index f02ea549a86089778c17784f60ee83f1780f6387..ba41b6f480b6df2f44a6d30b525eaee9a0230c8f 100644 (file)
@@ -1,4 +1,4 @@
-<div class="root-comment">
+<div *ngIf="isCommentDisplayed()" class="root-comment">
   <div class="left">
     <a *ngIf="!comment.isDeleted" [href]="comment.account.url" target="_blank" rel="noopener noreferrer">
       <img
 
         <div class="comment-account-date">
           <div class="comment-account">
-            <a
-              [routerLink]="[ '/accounts', comment.by ]"
-              class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }"
-            >
-              {{ comment.account.displayName }}
-            </a>
+            <a [routerLink]="[ '/accounts', comment.by ]">
+              <span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }">
+                {{ comment.account.displayName }}
+              </span>
 
-            <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account-fid ml-1">{{ comment.by }}</a>
+              <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>
+
+          <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"
         ></div>
 
         <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="isUserLoggedIn()" tabindex=0 (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
 
           <my-user-moderation-dropdown
-            [prependActions]="prependModerationActions"
+            [prependActions]="prependModerationActions" tabindex=0
             buttonSize="small" [account]="commentAccount" [user]="commentUser" i18n-label label="Options" placement="bottom-left auto"
           ></my-user-moderation-dropdown>
         </div>
@@ -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>