]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-library/my-follows/my-followers.component.ts
Add mute status in account and channel pages
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-follows / my-followers.component.ts
index a7bbe6d99251c4caf2700bfd4b14fc45da6974d1..0dd9bf6f5fa212ee52128abb9a6cbcb0105e4472 100644 (file)
@@ -2,6 +2,7 @@ import { Subject } from 'rxjs'
 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'
 
@@ -21,6 +22,8 @@ export class MyFollowersComponent implements OnInit {
   onDataSubject = new Subject<any[]>()
   search: string
 
+  inputFilters: AdvancedInputFilter[]
+
   constructor (
     private route: ActivatedRoute,
     private auth: AuthService,
@@ -32,6 +35,22 @@ export class MyFollowersComponent implements OnInit {
     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 () {