summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/admin
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-09-01 12:31:27 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-09-01 12:31:27 +0900
commitd27c740ab02b635da6ec7bb2d76835525009489e (patch)
tree343d4baaf9c25134ce4b1b69ab11fbfffa7aa6fc /packages/frontend/src/pages/admin
parentrefactor (diff)
downloadmisskey-d27c740ab02b635da6ec7bb2d76835525009489e.tar.gz
misskey-d27c740ab02b635da6ec7bb2d76835525009489e.tar.bz2
misskey-d27c740ab02b635da6ec7bb2d76835525009489e.zip
refactor
Diffstat (limited to 'packages/frontend/src/pages/admin')
-rw-r--r--packages/frontend/src/pages/admin/overview.active-users.vue7
-rw-r--r--packages/frontend/src/pages/admin/overview.ap-requests.vue15
2 files changed, 15 insertions, 7 deletions
diff --git a/packages/frontend/src/pages/admin/overview.active-users.vue b/packages/frontend/src/pages/admin/overview.active-users.vue
index f74356599b..6c85f11cb1 100644
--- a/packages/frontend/src/pages/admin/overview.active-users.vue
+++ b/packages/frontend/src/pages/admin/overview.active-users.vue
@@ -37,6 +37,8 @@ async function renderChart() {
chartInstance.destroy();
}
+ if (chartEl.value == null) return;
+
const getDate = (ago: number) => {
const y = now.getFullYear();
const m = now.getMonth();
@@ -105,7 +107,6 @@ async function renderChart() {
type: 'time',
offset: true,
time: {
- stepSize: 1,
unit: 'day',
displayFormats: {
day: 'M/d',
@@ -149,7 +150,9 @@ async function renderChart() {
},
external: externalTooltipHandler,
},
- gradient,
+ ...({ // TSを黙らすため
+ gradient,
+ }),
},
},
plugins: [chartVLine(vLineColor)],
diff --git a/packages/frontend/src/pages/admin/overview.ap-requests.vue b/packages/frontend/src/pages/admin/overview.ap-requests.vue
index 96ea4749dc..75f544c5a9 100644
--- a/packages/frontend/src/pages/admin/overview.ap-requests.vue
+++ b/packages/frontend/src/pages/admin/overview.ap-requests.vue
@@ -42,6 +42,9 @@ const { handler: externalTooltipHandler } = useChartTooltip();
const { handler: externalTooltipHandler2 } = useChartTooltip();
onMounted(async () => {
+ if (chartEl.value == null) return;
+ if (chartEl2.value == null) return;
+
const now = isChromatic() ? new Date('2024-08-31T10:00:00Z') : new Date();
const getDate = (ago: number) => {
@@ -122,7 +125,6 @@ onMounted(async () => {
stacked: true,
offset: false,
time: {
- stepSize: 1,
unit: 'day',
},
grid: {
@@ -144,7 +146,7 @@ onMounted(async () => {
ticks: {
display: true,
//mirror: true,
- callback: (value, index, values) => value < 0 ? -value : value,
+ callback: (value, index, values) => (value as number) < 0 ? -value : value,
},
},
},
@@ -173,7 +175,9 @@ onMounted(async () => {
label: context => `${context.dataset.label}: ${Math.abs(context.parsed.y)}`,
},
},
- gradient,
+ ...({ // TSを黙らすため
+ gradient,
+ }),
},
},
plugins: [chartVLine(vLineColor)],
@@ -213,7 +217,6 @@ onMounted(async () => {
type: 'time',
offset: false,
time: {
- stepSize: 1,
unit: 'day',
displayFormats: {
day: 'M/d',
@@ -260,7 +263,9 @@ onMounted(async () => {
},
external: externalTooltipHandler2,
},
- gradient,
+ ...({ // TSを黙らすため
+ gradient,
+ }),
},
},
plugins: [chartVLine(vLineColor)],