]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-library/my-history/my-history.component.html
Merge branch 'release/5.0.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-history / my-history.component.html
index 45ca37e0db6c400c12481a3d6002b895e0fc1fab..6791dab526eef0ffa5ec680648b436e13d8f8213 100644 (file)
@@ -1,11 +1,12 @@
 <h1>
   <my-global-icon iconName="history" aria-hidden="true"></my-global-icon>
-  <ng-container i18n>My watch history</ng-container> <span class="badge badge-secondary">{{ pagination.totalItems }}</span>
+  <ng-container i18n>My watch history</ng-container>
+  <span *ngIf="pagination.totalItems" class="pt-badge badge-secondary">{{ pagination.totalItems }}</span>
 </h1>
 
 <div class="top-buttons">
   <div class="search-wrapper">
-    <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter>
+    <my-advanced-input-filter [emitOnInit]="false" (search)="onSearch($event)"></my-advanced-input-filter>
   </div>
 
   <div class="history-switch">
@@ -13,9 +14,9 @@
     <label i18n>Track watch history</label>
   </div>
 
-  <button class="delete-history" (click)="deleteHistory()" i18n>
+  <button class="delete-history" (click)="clearAllHistory()" i18n>
     <my-global-icon iconName="delete" aria-hidden="true"></my-global-icon>
-    Delete history
+    Clear all history
   </button>
 </div>
 
   [titlePage]="titlePage"
   [getVideosObservableFunction]="getVideosObservableFunction"
   [user]="user"
-  [loadOnInit]="false"
-  i18n-noResultMessage noResultMessage="You don't have any video in your watch history yet."
+  [noResultMessage]="getNoResultMessage()"
   [enableSelection]="false"
+  [disabled]="disabled"
   #videosSelection
-></my-videos-selection>
+>
+  <ng-template ptTemplate="rowButtons" let-video>
+    <div class="action-button">
+      <my-delete-button i18n-label label="Delete from history" (click)="deleteHistoryElement(video)"></my-delete-button>
+    </div>
+  </ng-template>
+</my-videos-selection>