X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Ffollows%2Fvideo-redundancies-list%2Fvideo-redundancies-list.component.ts;h=07e2e0ff3363056102c00c8497b54ece2ee9acd2;hb=94676e631c5045144da598fefbefaa3cfcaaeb0d;hp=4b41d1d864ecaff57a867a9e2328e8ca57aca19c;hpb=4c1def5fd8e9f483238eb38e221f555e2e6bbf07;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts index 4b41d1d86..07e2e0ff3 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts @@ -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' }