]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-videos/my-account-videos.component.html
Fix regression blocklist-accounts icon in sub-title
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-videos / my-account-videos.component.html
index 1f3ac0005edaa0f9b9e69f82b5202f73b21661e6..f2ed0ac99c8ae2a7cd0ce30e45ad1b4790136eff 100644 (file)
@@ -1,49 +1,51 @@
-<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-thumbnail [video]="video"></my-video-thumbnail>
-
-    <div class="video-info">
-      <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a>
-      <span i18n class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
-      <div class="video-info-privacy">{{ video.privacy.label }}{{ getStateLabel(video) }}</div>
-      <div *ngIf="video.blacklisted" class="video-info-blacklisted">
-        <span class="blacklisted-label" i18n>Blacklisted</span>
-        <span class="blacklisted-reason" *ngIf="video.blacklistedReason">{{ video.blacklistedReason }}</span>
-      </div>
-    </div>
-
-    <!-- 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>
+<h1>
+  <span>
+    <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon>
+    <ng-container i18n>My videos</ng-container>
+    <span class="badge badge-secondary"> {{ pagination.totalItems }}</span>
+  </span>
+</h1>
+
+<div class="videos-header d-flex justify-content-between">
+  <div class="has-feedback has-clear">
+    <input type="text" placeholder="Search your videos" i18n-placeholder [(ngModel)]="videosSearch"
+      (ngModelChange)="onVideosSearchChanged()" />
+    <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a>
+    <span class="sr-only" i18n>Clear filters</span>
+  </div>
+</div>
 
-      <my-edit-button [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
+<my-videos-selection
+  [pagination]="pagination"
+  [(selection)]="selection"
+  [(videosModel)]="videos"
+  [miniatureDisplayOptions]="miniatureDisplayOptions"
+  [titlePage]="titlePage"
+  [getVideosObservableFunction]="getVideosObservableFunction"
+  [ownerDisplayType]="ownerDisplayType"
+  #videosSelection
+>
+  <ng-template ptTemplate="globalButtons">
+    <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()">
+      <my-global-icon iconName="delete" aria-hidden="true"></my-global-icon>
+      <ng-container i18n>Delete</ng-container>
+    </span>
+  </ng-template>
+
+  <ng-template ptTemplate="rowButtons" let-video>
+    <div class="action-button">
+      <my-delete-button label (click)="deleteVideo(video)"></my-delete-button>
+
+      <my-edit-button label [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
 
       <my-button i18n-label label="Change ownership"
-                 className="action-button-change-ownership"
-                 icon="im-with-her"
+                 className="action-button-change-ownership grey-button"
+                 icon="ownership-change"
                  (click)="changeOwnership($event, video)"
       ></my-button>
     </div>
-  </div>
-</div>
+  </ng-template>
+</my-videos-selection>
+
 
 <my-video-change-ownership #videoChangeOwnershipModal></my-video-change-ownership>