]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-videos/my-account-videos.component.html
Fix margins/widths with top-menu and main-col on small screens
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-videos / my-account-videos.component.html
index 3a4054de87eadc87e1ef7ba9b45ef025611ad5f6..b07b9c1a6cbb77b7fc02be661d64df2458a6cd63 100644 (file)
@@ -1,39 +1,39 @@
-<div i18n *ngIf="pagination.totalItems === 0">No results.</div>
-
-<div myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true" class="videos">
-  <div class="video" *ngFor="let video of videos; let i = index">
-    <div class="checkbox-container">
-      <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="checkedVideos[video.id]"></my-peertube-checkbox>
-    </div>
-
-    <my-video-miniature [video]="video" [displayOptions]="miniatureDisplayOptions" [displayAsRow]="true"></my-video-miniature>
-
-    <!-- Display only once -->
-    <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0">
-      <div class="action-selection-mode-child">
-        <span i18n class="action-button action-button-cancel-selection" (click)="abortSelectionMode()">
-          Cancel
-        </span>
-
-        <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()">
-          <my-global-icon iconName="delete"></my-global-icon>
-          <ng-container i18n>Delete</ng-container>
-        </span>
-      </div>
-    </div>
-
-    <div class="video-buttons" *ngIf="isInSelectionMode() === false">
-      <my-delete-button (click)="deleteVideo(video)"></my-delete-button>
-
-      <my-edit-button [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
-
-      <my-button i18n-label label="Change ownership"
-                 className="action-button-change-ownership"
-                 icon="im-with-her"
-                 (click)="changeOwnership($event, video)"
-      ></my-button>
-    </div>
-  </div>
+<div class="videos-header">
+  <h4 i18n>Videos <span class="badge badge-secondary">{{ pagination.totalItems }}</span></h4>
+
+  <input type="text" placeholder="Search your videos" i18n-placeholder [(ngModel)]="videosSearch" (ngModelChange)="onVideosSearchChanged()" />
+
+  <div class="fake-element"></div>
 </div>
 
+<my-videos-selection
+  [pagination]="pagination"
+  [(selection)]="selection"
+  [(videosModel)]="videos"
+  [miniatureDisplayOptions]="miniatureDisplayOptions"
+  [titlePage]="titlePage"
+  [getVideosObservableFunction]="getVideosObservableFunction"
+  #videosSelection
+>
+  <ng-template ptTemplate="globalButtons">
+    <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()">
+      <my-global-icon iconName="delete"></my-global-icon>
+      <ng-container i18n>Delete</ng-container>
+    </span>
+  </ng-template>
+
+  <ng-template ptTemplate="rowButtons" let-video>
+    <my-delete-button (click)="deleteVideo(video)"></my-delete-button>
+
+    <my-edit-button [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
+
+    <my-button i18n-label label="Change ownership"
+               className="action-button-change-ownership grey-button"
+               icon="im-with-her"
+               (click)="changeOwnership($event, video)"
+    ></my-button>
+  </ng-template>
+</my-videos-selection>
+
+
 <my-video-change-ownership #videoChangeOwnershipModal></my-video-change-ownership>