]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
Remove angular pipes module
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / follows / video-redundancies-list / video-redundancies-list.component.ts
index 4b41d1d864ecaff57a867a9e2328e8ca57aca19c..07e2e0ff3363056102c00c8497b54ece2ee9acd2 100644 (file)
@@ -1,26 +1,22 @@
-import { Component, OnInit } from '@angular/core'
-import { Notifier, ServerService } from '@app/core'
 import { SortMeta } from 'primeng/api'
-import { ConfirmService } from '../../../core/confirm/confirm.service'
-import { RestPagination, RestTable } from '../../../shared'
+import { Component, OnInit } from '@angular/core'
+import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
+import { BytesPipe, RedundancyService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
+import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
 import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models'
-import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage'
 import { VideosRedundancyStats } from '@shared/models/server'
-import { BytesPipe } from 'ngx-pipes'
-import { RedundancyService } from '@app/shared/video/redundancy.service'
 
 @Component({
   selector: 'my-video-redundancies-list',
   templateUrl: './video-redundancies-list.component.html',
-  styleUrls: [ './video-redundancies-list.component.scss' ]
+  styleUrls: [ '../follows.component.scss', './video-redundancies-list.component.scss' ]
 })
 export class VideoRedundanciesListComponent extends RestTable implements OnInit {
   private static LOCAL_STORAGE_DISPLAY_TYPE = 'video-redundancies-list-display-type'
 
   videoRedundancies: VideoRedundancy[] = []
   totalRecords = 0
-  rowsPerPage = 10
 
   sort: SortMeta = { field: 'name', order: 1 }
   pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
@@ -44,6 +40,10 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
     this.bytesPipe = new BytesPipe()
   }
 
+  getIdentifier () {
+    return 'VideoRedundanciesListComponent'
+  }
+
   ngOnInit () {
     this.loadSelectLocalStorage()
 
@@ -61,6 +61,12 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
         })
   }
 
+  getColspan () {
+    if (this.isDisplayingRemoteVideos()) return 5
+
+    return 4
+  }
+
   isDisplayingRemoteVideos () {
     return this.displayType === 'remote-videos'
   }