aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/following-list
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/follows/following-list')
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.html13
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.ts5
2 files changed, 11 insertions, 7 deletions
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.html b/client/src/app/+admin/follows/following-list/following-list.component.html
index 302dc9528..856c4a31f 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.html
+++ b/client/src/app/+admin/follows/following-list/following-list.component.html
@@ -20,7 +20,7 @@
20 </div> 20 </div>
21 21
22 <div class="ms-auto"> 22 <div class="ms-auto">
23 <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> 23 <my-advanced-input-filter [filters]="searchFilters" (search)="onSearch($event)"></my-advanced-input-filter>
24 </div> 24 </div>
25 </div> 25 </div>
26 </ng-template> 26 </ng-template>
@@ -47,11 +47,10 @@
47 </a> 47 </a>
48 </td> 48 </td>
49 49
50 <td *ngIf="follow.state === 'accepted'"> 50 <td>
51 <span class="pt-badge badge-green" i18n>Accepted</span> 51 <span *ngIf="follow.state === 'accepted'" class="pt-badge badge-green" i18n>Accepted</span>
52 </td> 52 <span *ngIf="follow.state === 'pending'" class="pt-badge badge-yellow" i18n>Pending</span>
53 <td *ngIf="follow.state === 'pending'"> 53 <span *ngIf="follow.state === 'rejected'" class="pt-badge badge-red" i18n>Rejected</span>
54 <span class="pt-badge badge-yellow" i18n>Pending</span>
55 </td> 54 </td>
56 55
57 <td>{{ follow.createdAt | date: 'short' }}</td> 56 <td>{{ follow.createdAt | date: 'short' }}</td>
@@ -66,7 +65,7 @@
66 65
67 <ng-template pTemplate="emptymessage"> 66 <ng-template pTemplate="emptymessage">
68 <tr> 67 <tr>
69 <td colspan="6"> 68 <td colspan="5">
70 <div class="no-results"> 69 <div class="no-results">
71 <ng-container *ngIf="search" i18n>No host found matching current filters.</ng-container> 70 <ng-container *ngIf="search" i18n>No host found matching current filters.</ng-container>
72 <ng-container *ngIf="!search" i18n>Your instance is not following anyone.</ng-container> 71 <ng-container *ngIf="!search" i18n>Your instance is not following anyone.</ng-container>
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts
index 2c0f6db0c..7a854be81 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.ts
+++ b/client/src/app/+admin/follows/following-list/following-list.component.ts
@@ -1,6 +1,7 @@
1import { SortMeta } from 'primeng/api' 1import { SortMeta } from 'primeng/api'
2import { Component, OnInit, ViewChild } from '@angular/core' 2import { Component, OnInit, ViewChild } from '@angular/core'
3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' 3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
4import { AdvancedInputFilter } from '@app/shared/shared-forms'
4import { InstanceFollowService } from '@app/shared/shared-instance' 5import { InstanceFollowService } from '@app/shared/shared-instance'
5import { ActorFollow } from '@shared/models' 6import { ActorFollow } from '@shared/models'
6import { FollowModalComponent } from './follow-modal.component' 7import { FollowModalComponent } from './follow-modal.component'
@@ -17,12 +18,16 @@ export class FollowingListComponent extends RestTable implements OnInit {
17 sort: SortMeta = { field: 'createdAt', order: -1 } 18 sort: SortMeta = { field: 'createdAt', order: -1 }
18 pagination: RestPagination = { count: this.rowsPerPage, start: 0 } 19 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
19 20
21 searchFilters: AdvancedInputFilter[]
22
20 constructor ( 23 constructor (
21 private notifier: Notifier, 24 private notifier: Notifier,
22 private confirmService: ConfirmService, 25 private confirmService: ConfirmService,
23 private followService: InstanceFollowService 26 private followService: InstanceFollowService
24 ) { 27 ) {
25 super() 28 super()
29
30 this.searchFilters = this.followService.buildFollowsListFilters()
26 } 31 }
27 32
28 ngOnInit () { 33 ngOnInit () {