From 2353b5f55334aa83e2051c334606ac518c579c05 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 27 Dec 2022 12:30:34 +0900 Subject: [PATCH] enhance(client): make heatmap available on about page --- .../src/components/MkActiveUsersHeatmap.vue | 236 ++++++++++++++++++ .../client/src/components/MkInstanceStats.vue | 9 + .../src/pages/admin/overview.heatmap.vue | 226 +---------------- 3 files changed, 248 insertions(+), 223 deletions(-) create mode 100644 packages/client/src/components/MkActiveUsersHeatmap.vue diff --git a/packages/client/src/components/MkActiveUsersHeatmap.vue b/packages/client/src/components/MkActiveUsersHeatmap.vue new file mode 100644 index 000000000..02b2eeeb3 --- /dev/null +++ b/packages/client/src/components/MkActiveUsersHeatmap.vue @@ -0,0 +1,236 @@ + + + diff --git a/packages/client/src/components/MkInstanceStats.vue b/packages/client/src/components/MkInstanceStats.vue index 5f5f64b0c..7199c33c3 100644 --- a/packages/client/src/components/MkInstanceStats.vue +++ b/packages/client/src/components/MkInstanceStats.vue @@ -34,6 +34,9 @@ +
+ +
Sub
@@ -72,6 +75,7 @@ import MkChart from '@/components/MkChart.vue'; import { useChartTooltip } from '@/scripts/use-chart-tooltip'; import * as os from '@/os'; import { i18n } from '@/i18n'; +import MkActiveUsersHeatmap from '@/components/MkActiveUsersHeatmap.vue'; Chart.register( ArcElement, @@ -196,6 +200,11 @@ onMounted(() => { } } + > .heatmap { + padding: 16px; + margin-bottom: 16px; + } + > .subpub { display: flex; gap: 16px; diff --git a/packages/client/src/pages/admin/overview.heatmap.vue b/packages/client/src/pages/admin/overview.heatmap.vue index 0bf1fa0a4..16d1c83b9 100644 --- a/packages/client/src/pages/admin/overview.heatmap.vue +++ b/packages/client/src/pages/admin/overview.heatmap.vue @@ -1,231 +1,11 @@