From 481a30294422989f2aae211d8e8ab7a01fc08b36 Mon Sep 17 00:00:00 2001 From: mkljczk Date: Wed, 29 Jan 2025 20:07:09 +0100 Subject: [PATCH] pl-fe: show mau on non-pleromas Signed-off-by: mkljczk --- .../pl-fe/src/features/admin/tabs/dashboard.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/pl-fe/src/features/admin/tabs/dashboard.tsx b/packages/pl-fe/src/features/admin/tabs/dashboard.tsx index 73b56cfcf..fd9948224 100644 --- a/packages/pl-fe/src/features/admin/tabs/dashboard.tsx +++ b/packages/pl-fe/src/features/admin/tabs/dashboard.tsx @@ -25,8 +25,9 @@ const Dashboard: React.FC = () => { status_count: statusCount, domain_count: domainCount, } = instance.stats; + console.log(instance); - const mau = instance.pleroma.stats.mau; + const mau = instance.usage.users.active_month ?? instance.pleroma.stats.mau; const retention = (userCount && mau) ? Math.round(mau / userCount * 100) : undefined; if (!account) return null; @@ -60,17 +61,19 @@ const Dashboard: React.FC = () => { - {account.is_admin && ( + {features.pleromaAdminAccounts && account.is_admin && ( } /> )} - } - /> + {features.pleromaAdminModerationLog && ( + } + /> + )} {features.pleromaAdminAnnouncements && ( { )} - {account.is_admin && ( + {features.pleromaAdminAccounts && account.is_admin && ( <> }