]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comments.component.html
Refractor notification service
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comments.component.html
index f95e2cbba7dc29e6ebabb6ab4b08527292c73028..44016d8ad05edc3ecc46072f29cab91d136435c5 100644 (file)
@@ -1,41 +1,45 @@
 <div>
-  <div class="title-page title-page-single">
-    Comments
+  <div class="title-block">
+    <div i18n class="title-page title-page-single">
+      Comments
+    </div>
+
+    <my-feed [syndicationItems]="syndicationItems"></my-feed>
   </div>
 
   <ng-template [ngIf]="video.commentsEnabled === true">
     <my-video-comment-add
-      *ngIf="isUserLoggedIn()"
       [video]="video"
       [user]="user"
       (commentCreated)="onCommentThreadCreated($event)"
     ></my-video-comment-add>
 
-    <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0">No comments.</div>
+    <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0" i18n>No comments.</div>
 
     <div
       class="comment-threads"
       myInfiniteScroller
-      [autoLoading]="true"
+      [autoInit]="true"
       (nearOfBottom)="onNearOfBottom()"
     >
-      <div *ngIf="highlightedComment" id="highlighted-comment">
+      <div #commentHighlightBlock id="highlighted-comment">
         <my-video-comment
-            [comment]="highlightedComment"
-            [video]="video"
-            [inReplyToCommentId]="inReplyToCommentId"
-            [commentTree]="threadComments[highlightedComment.id]"
-            [highlightedComment]="true"
-            (wantedToReply)="onWantedToReply($event)"
-            (wantedToDelete)="onWantedToDelete($event)"
-            (threadCreated)="onThreadCreated($event)"
-            (resetReply)="onResetReply()"
+          *ngIf="highlightedThread"
+          [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="!highlightedComment || comment.id !== highlightedComment.id"
+          *ngIf="!highlightedThread || comment.id !== highlightedThread.id"
           [comment]="comment"
           [video]="video"
           [inReplyToCommentId]="inReplyToCommentId"
@@ -47,7 +51,7 @@
         ></my-video-comment>
 
         <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">
-          View all {{ comment.totalReplies }} replies
+          <ng-container i18n>View all {{ comment.totalReplies }} replies</ng-container>
 
           <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
           <my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader>
@@ -56,7 +60,7 @@
     </div>
   </ng-template>
 
-  <div *ngIf="video.commentsEnabled === false">
+  <div *ngIf="video.commentsEnabled === false" i18n>
     Comments are disabled.
   </div>
 </div>