]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comments.component.html
Add commentor name alongside fid for video comments
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comments.component.html
index 7b941454a96672a6bf1b83cbe6a4390d4bb15ff1..5fabb7dfe70a62df015e88980eeb70b239532bd7 100644 (file)
@@ -1,7 +1,12 @@
 <div>
   <div class="title-block">
-    <div i18n class="title-page title-page-single">
-      Comments
+    <div class="title-page title-page-single">
+      <ng-container *ngIf="comments.length > 0; then hasComments; else noComments"></ng-container>
+      <ng-template #hasComments>
+        <ng-container i18n *ngIf="comments.length === 1; else manyComments">1 Comment</ng-container>
+        <ng-template i18n #manyComments>{{ comments.length }} Comments</ng-template>
+      </ng-template>
+      <ng-template i18n #noComments>Comments</ng-template>
     </div>
 
     <my-feed [syndicationItems]="syndicationItems"></my-feed>
@@ -21,6 +26,7 @@
       myInfiniteScroller
       [autoInit]="true"
       (nearOfBottom)="onNearOfBottom()"
+      [dataObservable]="onDataSubject.asObservable()"
     >
       <div #commentHighlightBlock id="highlighted-comment">
         <my-video-comment
@@ -34,6 +40,7 @@
           (wantedToDelete)="onWantedToDelete($event)"
           (threadCreated)="onThreadCreated($event)"
           (resetReply)="onResetReply()"
+          (timestampClicked)="handleTimestampClicked($event)"
         ></my-video-comment>
       </div>
 
@@ -48,6 +55,7 @@
           (wantedToDelete)="onWantedToDelete($event)"
           (threadCreated)="onThreadCreated($event)"
           (resetReply)="onResetReply()"
+          (timestampClicked)="handleTimestampClicked($event)"
         ></my-video-comment>
 
         <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">