From 11bde88a0224c08d0935c66f74e52867c11e5530 Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Wed, 20 Apr 2022 09:26:12 +0200
Subject: [PATCH] Add pagination to the instances list
Signed-off-by: Thomas Citharel
---
js/src/views/Admin/Instances.vue | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/js/src/views/Admin/Instances.vue b/js/src/views/Admin/Instances.vue
index 5856f5ef3..2431409fa 100644
--- a/js/src/views/Admin/Instances.vue
+++ b/js/src/views/Admin/Instances.vue
@@ -124,6 +124,17 @@
+
+
@@ -163,6 +174,8 @@ import {
import { SnackbarProgrammatic as Snackbar } from "buefy";
const { isNavigationFailure, NavigationFailureType } = VueRouter;
+const INSTANCES_PAGE_LIMIT = 10;
+
@Component({
apollo: {
instances: {
@@ -171,7 +184,7 @@ const { isNavigationFailure, NavigationFailureType } = VueRouter;
variables() {
return {
page: this.instancePage,
- limit: 10,
+ limit: INSTANCES_PAGE_LIMIT,
filterDomain: this.filterDomain,
filterFollowStatus: this.followStatus,
};
@@ -204,6 +217,8 @@ export default class Follows extends Vue {
InstanceFollowStatus = InstanceFollowStatus;
+ INSTANCES_PAGE_LIMIT = INSTANCES_PAGE_LIMIT;
+
data(): Record {
return {
debouncedUpdateDomainFilter: debounce(this.updateDomainFilter, 500),