Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add quick filters for follows

Chocobozzzd46438767850
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.html b/client/src/app/+admin/follows/followers-list/followers-list.component.html
index 3bf1a2b93d..eff57336c1 100644
--- a/client/src/app/+admin/follows/followers-list/followers-list.component.html
+++ b/client/src/app/+admin/follows/followers-list/followers-list.component.html
@@ -25,11 +25,11 @@
<td>
@if (follow.state === 'accepted') {
- <span class="pt-badge badge-green" i18n>Accepted</span>
+ <a routerLink="." [queryParams]="{ state: follow.state }" title="Filter by state: Accepted" class="pt-badge badge-green" i18n>Accepted</a>
} @else if (follow.state === 'pending') {
- <span class="pt-badge badge-yellow" i18n>Pending</span>
+ <a routerLink="." [queryParams]="{ state: follow.state }" title="Filter by state: Pending" class="pt-badge badge-yellow" i18n>Pending</a>
} @else if (follow.state === 'rejected') {
- <span class="pt-badge badge-red" i18n>Rejected</span>
+ <a routerLink="." [queryParams]="{ state: follow.state }" title="Filter by state: Rejected" class="pt-badge badge-red" i18n>Rejected</a>
}
</td>
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts
index e49b3066ff..45916d81ad 100644
--- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts
+++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit, inject, viewChild } from '@angular/core'
+import { RouterLink } from '@angular/router'
import { ConfirmService, Notifier } from '@app/core'
import { formatICU } from '@app/helpers'
import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
@@ -19,6 +20,7 @@ type DataLoaderParameter = Parameters<FollowersListComponent['_dataLoader']>[0]
templateUrl: './followers-list.component.html',
styleUrls: [ './followers-list.component.scss' ],
imports: [
+ RouterLink,
GlobalIconComponent,
ButtonComponent,
DeleteButtonComponent,
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 716aad6cbb..f576eca52b 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
@@ -32,13 +32,11 @@
<td>
@if (follow.state === 'accepted') {
- <span class="pt-badge badge-green" i18n>Accepted</span>
- }
- @if (follow.state === 'pending') {
- <span class="pt-badge badge-yellow" i18n>Pending</span>
- }
- @if (follow.state === 'rejected') {
- <span class="pt-badge badge-red" i18n>Rejected</span>
+ <a routerLink="." [queryParams]="{ state: follow.state }" title="Filter by state: Accepted" class="pt-badge badge-green" i18n>Accepted</a>
+ } @else if (follow.state === 'pending') {
+ <a routerLink="." [queryParams]="{ state: follow.state }" title="Filter by state: Pending" class="pt-badge badge-yellow" i18n>Pending</a>
+ } @else if (follow.state === 'rejected') {
+ <a routerLink="." [queryParams]="{ state: follow.state }" title="Filter by state: Rejected" class="pt-badge badge-red" i18n>Rejected</a>
}
</td>
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 9ce7799d78..fdf5681a00 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,4 +1,5 @@
import { Component, OnInit, inject, viewChild } from '@angular/core'
+import { RouterLink } from '@angular/router'
import { ConfirmService, Notifier } from '@app/core'
import { formatICU } from '@app/helpers'
import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
@@ -19,6 +20,7 @@ type DataLoaderParameter = Parameters<FollowingListComponent['_dataLoader']>[0]
templateUrl: './following-list.component.html',
styleUrls: [ './following-list.component.scss' ],
imports: [
+ RouterLink,
GlobalIconComponent,
DeleteButtonComponent,
RedundancyCheckboxComponent,