import { Video } from '@app/shared/video/video.model'
import { PeerTubeTemplateDirective } from '@app/shared/angular/peertube-template.directive'
import { VideoSortField } from '@app/shared/video/sort-field.type'
+import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
+import { I18n } from '@ngx-translate/i18n-polyfill'
export type SelectionType = { [ id: number ]: boolean }
styleUrls: [ './videos-selection.component.scss' ]
})
export class VideosSelectionComponent extends AbstractVideoList implements OnInit, OnDestroy, AfterContentInit {
+ @Input() pagination: ComponentPagination
@Input() titlePage: string
@Input() miniatureDisplayOptions: MiniatureDisplayOptions
@Input() getVideosObservableFunction: (page: number, sort?: VideoSortField) => Observable<{ videos: Video[], totalVideos: number }>
globalButtonsTemplate: TemplateRef<any>
constructor (
+ protected i18n: I18n,
protected router: Router,
protected route: ActivatedRoute,
protected notifier: Notifier,
super()
}
- ngAfterContentInit () {
- {
- const t = this.templates.find(t => t.name === 'rowButtons')
- if (t) this.rowButtonsTemplate = t.template
- }
-
- {
- const t = this.templates.find(t => t.name === 'globalButtons')
- if (t) this.globalButtonsTemplate = t.template
- }
- }
-
@Input() get selection () {
return this._selection
}
super.ngOnInit()
}
+ ngAfterContentInit () {
+ {
+ const t = this.templates.find(t => t.name === 'rowButtons')
+ if (t) this.rowButtonsTemplate = t.template
+ }
+
+ {
+ const t = this.templates.find(t => t.name === 'globalButtons')
+ if (t) this.globalButtonsTemplate = t.template
+ }
+ }
+
ngOnDestroy () {
super.ngOnDestroy()
}