Fix broken playlist api
[oweals/peertube.git] / client / src / app / shared / video / abstract-video-list.html
index 60a2563b3dc2f56ada96d3a063daf29723a2c3a5..efd369bcadef871858403802304ac251dd22e0d8 100644 (file)
@@ -1,22 +1,38 @@
 <div class="margin-content">
-  <div class="title-page title-page-single">
-    {{ titlePage }}
-  </div>
+  <div class="videos-header">
+    <div *ngIf="titlePage" class="title-page title-page-single">
+      <div placement="bottom" [ngbTooltip]="titleTooltip" container="body">
+        {{ titlePage }}
+      </div>
+    </div>
+
+    <my-feed *ngIf="titlePage" [syndicationItems]="syndicationItems"></my-feed>
 
-  <div *ngIf="pagination.totalItems === 0">No results.</div>
+    <div class="moderation-block" *ngIf="displayModerationBlock">
+      <my-peertube-checkbox
+        (change)="toggleModerationDisplay()"
+        inputName="display-unlisted-private" i18n-labelText labelText="Display unlisted and private videos"
+      >
+      </my-peertube-checkbox>
+    </div>
+  </div>
 
+  <div class="no-results" i18n *ngIf="pagination.totalItems === 0">No results.</div>
   <div
+    myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true"
     class="videos"
-    infiniteScroll
-    [infiniteScrollUpDistance]="1.5"
-    [infiniteScrollDistance]="0.5"
-    (scrolled)="onNearOfBottom()"
-    (scrolledUp)="onNearOfTop()"
   >
-    <my-video-miniature
-      class="ng-animate"
-      *ngFor="let video of videos" [video]="video" [user]="user"
-    >
-    </my-video-miniature>
+    <ng-container *ngFor="let video of videos; trackBy: videoById;">
+      <div class="date-title" *ngIf="getCurrentGroupedDateLabel(video)">
+        {{ getCurrentGroupedDateLabel(video) }}
+      </div>
+
+      <my-video-miniature
+        [video]="video" [user]="user" [ownerDisplayType]="ownerDisplayType"
+        [displayVideoActions]="displayVideoActions" [displayOptions]="displayOptions"
+        (videoBlacklisted)="removeVideoFromArray(video)" (videoRemoved)="removeVideoFromArray(video)"
+      >
+      </my-video-miniature>
+    </ng-container>
   </div>
 </div>