import { Component, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { AuthService, ComponentPagination, Notifier } from '@app/core'
+import { AdvancedInputFilter } from '@app/shared/shared-forms'
import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
import { ActorFollow } from '@shared/models'
onDataSubject = new Subject<any[]>()
search: string
+ inputFilters: AdvancedInputFilter[]
+
constructor (
private route: ActivatedRoute,
private auth: AuthService,
if (this.route.snapshot.queryParams['search']) {
this.search = this.route.snapshot.queryParams['search']
}
+
+ this.auth.userInformationLoaded.subscribe(() => {
+ const channelFilters = this.auth.getUser().videoChannels.map(c => {
+ return {
+ value: 'channel:' + c.name,
+ label: c.name
+ }
+ })
+
+ this.inputFilters = [
+ {
+ title: $localize`Channel filters`,
+ children: channelFilters
+ }
+ ]
+ })
}
onNearOfBottom () {