X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Faccount%2Faccount-videos%2Faccount-videos.component.ts;h=91bc1b695c2cbecbd31b79f829c0190f855cb6f1;hb=2a2c19dfef7a9aa313c6ca0798f271c9a63449a9;hp=cd0f8e752dd6024827e348b0c2e16373073ac19c;hpb=c1dd9b0734336a769f5dce9800b447c3d0e58bb1;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/account/account-videos/account-videos.component.ts b/client/src/app/account/account-videos/account-videos.component.ts index cd0f8e752..91bc1b695 100644 --- a/client/src/app/account/account-videos/account-videos.component.ts +++ b/client/src/app/account/account-videos/account-videos.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit, OnDestroy } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' +import { Location } from '@angular/common' import { immutableAssign } from '@app/shared/misc/utils' import { ComponentPagination } from '@app/shared/rest/component-pagination.model' import { NotificationsService } from 'angular2-notifications' @@ -23,7 +24,7 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, checkedVideos: { [ id: number ]: boolean } = {} pagination: ComponentPagination = { currentPage: 1, - itemsPerPage: 10, + itemsPerPage: 5, totalItems: null } @@ -35,12 +36,15 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, protected authService: AuthService, protected notificationsService: NotificationsService, protected confirmService: ConfirmService, + protected location: Location, private videoService: VideoService) { super() } ngOnInit () { super.ngOnInit() + + // this.generateSyndicationList() } ngOnDestroy () { @@ -61,6 +65,10 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, return this.videoService.getMyVideos(newPagination, this.sort) } + generateSyndicationList () { + throw new Error('Method not implemented.') + } + async deleteSelectedVideos () { const toDeleteVideosIds = Object.keys(this.checkedVideos) .filter(k => this.checkedVideos[k] === true) @@ -106,6 +114,11 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, ) } + protected buildVideoHeight () { + // In account videos, the video height is fixed + return this.baseVideoHeight + } + private spliceVideosById (id: number) { for (const key of Object.keys(this.loadedPages)) { const videos = this.loadedPages[key]