]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comments.component.html
feature: initial syndication feeds support
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comments.component.html
index 078900e0659aa6035f6e4fa32e729601dac69153..6f3e571602ed7d860b392ba2660511f304a5cf9d 100644 (file)
@@ -7,6 +7,7 @@
     <my-video-comment-add
       *ngIf="isUserLoggedIn()"
       [video]="video"
+      [user]="user"
       (commentCreated)="onCommentThreadCreated($event)"
     ></my-video-comment-add>
 
 
     <div
       class="comment-threads"
-      infiniteScroll
-      [infiniteScrollUpDistance]="1.5"
-      [infiniteScrollDistance]="0.5"
-      (scrolled)="onNearOfBottom()"
+      myInfiniteScroller
+      [autoLoading]="true"
+      (nearOfBottom)="onNearOfBottom()"
     >
+      <div *ngIf="highlightedThread" id="highlighted-comment">
+        <my-video-comment
+            [comment]="highlightedThread"
+            [video]="video"
+            [inReplyToCommentId]="inReplyToCommentId"
+            [commentTree]="threadComments[highlightedThread.id]"
+            [highlightedComment]="true"
+            (wantedToReply)="onWantedToReply($event)"
+            (wantedToDelete)="onWantedToDelete($event)"
+            (threadCreated)="onThreadCreated($event)"
+            (resetReply)="onResetReply()"
+        ></my-video-comment>
+      </div>
+
       <div *ngFor="let comment of comments">
         <my-video-comment
+          *ngIf="!highlightedThread || comment.id !== highlightedThread.id"
           [comment]="comment"
           [video]="video"
           [inReplyToCommentId]="inReplyToCommentId"
           [commentTree]="threadComments[comment.id]"
           (wantedToReply)="onWantedToReply($event)"
+          (wantedToDelete)="onWantedToDelete($event)"
+          (threadCreated)="onThreadCreated($event)"
           (resetReply)="onResetReply()"
         ></my-video-comment>
 
-        <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment)" class="view-replies">
+        <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">
           View all {{ comment.totalReplies }} replies
 
           <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>