</h1>
<div class="followers-header">
- <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter>
+ <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
</div>
<div class="no-results" i18n *ngIf="pagination.totalItems === 0">No follower found.</div>
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(() => {
+ this.inputFilters = this.auth.getUser().videoChannels.map(c => {
+ return {
+ queryParams: { search: 'channel:' + c.name },
+ label: $localize`Followers of ${c.name}`
+ }
+ })
+ })
}
onNearOfBottom () {