]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts
smaller miniature average size in fluid grid, updated admin instructions for global...
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-blacklist-list / video-blacklist-list.component.ts
index a215714b8f6f2bfb550c38323a108b406563620c..63ecdeb9ff84d30b7eed1c697c8ced73bf347b68 100644 (file)
@@ -17,8 +17,7 @@ import { MarkdownService } from '@app/shared/renderer'
 export class VideoBlacklistListComponent extends RestTable implements OnInit {
   blacklist: (VideoBlacklist & { reasonHtml?: string })[] = []
   totalRecords = 0
-  rowsPerPage = 10
-  sort: SortMeta = { field: 'createdAt', order: 1 }
+  sort: SortMeta = { field: 'createdAt', order: -1 }
   pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
   listBlacklistTypeFilter: VideoBlacklistType = undefined
 
@@ -38,7 +37,7 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit {
   ngOnInit () {
     this.serverService.getConfig()
         .subscribe(config => {
-          // don't filter if auto-blacklist not enabled as this will be only list
+          // don't filter if auto-blacklist is not enabled as this will be the only list
           if (config.autoBlacklist.videos.ofUsers.enabled) {
             this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL
           }
@@ -54,6 +53,10 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit {
     ]
   }
 
+  getIdentifier () {
+    return 'VideoBlacklistListComponent'
+  }
+
   getVideoUrl (videoBlacklist: VideoBlacklist) {
     return Video.buildClientUrl(videoBlacklist.video.uuid)
   }
@@ -87,7 +90,12 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit {
   }
 
   protected loadData () {
-    this.videoBlacklistService.listBlacklist(this.pagination, this.sort, this.listBlacklistTypeFilter)
+    this.videoBlacklistService.listBlacklist({
+      pagination: this.pagination,
+      sort: this.sort,
+      search: this.search,
+      type: this.listBlacklistTypeFilter
+    })
       .subscribe(
         async resultList => {
           this.totalRecords = resultList.total