X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bmy-account%2Fmy-account-video-imports%2Fmy-account-video-imports.component.ts;h=42ddb0ee28578bb0d041e077a9a25977967d5c83;hb=dfe3f7b72ef46401206f6f461077a7984a0c72f0;hp=d9fb20446067e087866d216f4a6232aac9d6eb95;hpb=0b4e5fe32708afce54212810738aa4d0c3dc178d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts index d9fb20446..42ddb0ee2 100644 --- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts +++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts @@ -1,10 +1,8 @@ +import { SortMeta } from 'primeng/api' import { Component, OnInit } from '@angular/core' -import { RestPagination, RestTable } from '@app/shared' -import { SortMeta } from 'primeng/components/common/sortmeta' -import { NotificationsService } from 'angular2-notifications' -import { I18n } from '@ngx-translate/i18n-polyfill' -import { VideoImport, VideoImportState } from '../../../../../shared/models/videos' -import { VideoImportService } from '@app/shared/video-import' +import { Notifier, RestPagination, RestTable } from '@app/core' +import { VideoImportService } from '@app/shared/shared-main' +import { VideoImport, VideoImportState } from '@shared/models' @Component({ selector: 'my-account-video-imports', @@ -14,20 +12,22 @@ import { VideoImportService } from '@app/shared/video-import' export class MyAccountVideoImportsComponent extends RestTable implements OnInit { videoImports: VideoImport[] = [] totalRecords = 0 - rowsPerPage = 10 sort: SortMeta = { field: 'createdAt', order: 1 } pagination: RestPagination = { count: this.rowsPerPage, start: 0 } constructor ( - private notificationsService: NotificationsService, - private videoImportService: VideoImportService, - private i18n: I18n + private notifier: Notifier, + private videoImportService: VideoImportService ) { super() } ngOnInit () { - this.loadSort() + this.initialize() + } + + getIdentifier () { + return 'MyAccountVideoImportsComponent' } isVideoImportSuccess (videoImport: VideoImport) { @@ -58,7 +58,7 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit this.totalRecords = resultList.total }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } }