From 2b1e03cc64d5ba2afada47755d4c05f9ae7821e6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 29 Jun 2022 14:14:27 +0900 Subject: [PATCH] enhance(client): add users tab to instance-info --- packages/client/src/pages/instance-info.vue | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/client/src/pages/instance-info.vue b/packages/client/src/pages/instance-info.vue index 6d52f2a871..4eaa60112d 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -95,6 +95,13 @@ +
+ + + + + +
@@ -121,6 +128,8 @@ import bytes from '@/filters/bytes'; import { iAmModerator } from '@/account'; import { definePageMetadata } from '@/scripts/page-metadata'; import { i18n } from '@/i18n'; +import MkUserCardMini from '@/components/user-card-mini.vue'; +import MkPagination from '@/components/ui/pagination.vue'; const props = defineProps<{ host: string; @@ -133,6 +142,18 @@ let instance = $ref(null); let suspended = $ref(false); let isBlocked = $ref(false); +const usersPagination = { + endpoint: 'admin/show-users' as const, + limit: 10, + params: { + sort: '+updatedAt', + state: 'all', + origin: 'remote', + hostname: props.host, + }, + offsetMode: true, +}; + async function fetch() { instance = await os.api('federation/show-instance', { host: props.host, @@ -182,6 +203,10 @@ const headerTabs = $computed(() => [{ key: 'chart', title: i18n.ts.charts, icon: 'fas fa-chart-simple', +}, { + key: 'users', + title: i18n.ts.users, + icon: 'fas fa-users', }, { key: 'raw', title: 'Raw data',