X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-video-miniature%2Fvideos-selection.component.ts;h=d64ee9b981ecc3c94f84c5b935466614b403c8da;hb=8cbc40b2fe9d36ef0505b9441276ca561342e9e9;hp=2b060b1300dd195b9cee466200f49d69258dced9;hpb=66357162f8e1227495f09bd4f68446aad7071c6d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts index 2b060b130..d64ee9b98 100644 --- a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts +++ b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts @@ -2,6 +2,7 @@ import { Observable } from 'rxjs' import { AfterContentInit, Component, + ComponentFactoryResolver, ContentChildren, EventEmitter, Input, @@ -12,11 +13,11 @@ import { TemplateRef } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' -import { AuthService, ComponentPagination, LocalStorageService, Notifier, ScreenService, ServerService, UserService } from '@app/core' +import { AuthService, ComponentPagination, LocalStorageService, Notifier, ScreenService, ServerService, User, UserService } from '@app/core' import { ResultList, VideoSortField } from '@shared/models' import { PeerTubeTemplateDirective, Video } from '../shared-main' import { AbstractVideoList } from './abstract-video-list' -import { MiniatureDisplayOptions, OwnerDisplayType } from './video-miniature.component' +import { MiniatureDisplayOptions } from './video-miniature.component' export type SelectionType = { [ id: number ]: boolean } @@ -26,10 +27,13 @@ export type SelectionType = { [ id: number ]: boolean } styleUrls: [ './videos-selection.component.scss' ] }) export class VideosSelectionComponent extends AbstractVideoList implements OnInit, OnDestroy, AfterContentInit { + @Input() user: User @Input() pagination: ComponentPagination @Input() titlePage: string @Input() miniatureDisplayOptions: MiniatureDisplayOptions - @Input() ownerDisplayType: OwnerDisplayType + @Input() noResultMessage = $localize`No results.` + @Input() enableSelection = true + @Input() loadOnInit = true @Input() getVideosObservableFunction: (page: number, sort?: VideoSortField) => Observable> @@ -51,7 +55,8 @@ export class VideosSelectionComponent extends AbstractVideoList implements OnIni protected userService: UserService, protected screenService: ScreenService, protected storageService: LocalStorageService, - protected serverService: ServerService + protected serverService: ServerService, + protected cfr: ComponentFactoryResolver ) { super() }