see if this works

This commit is contained in:
ThatOneCalculator 2023-04-25 18:21:15 -07:00
parent 8fa0919810
commit a6761ec278
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
3 changed files with 15 additions and 5 deletions

View File

@ -41,7 +41,7 @@ export const meta = {
message: "Cannot find the following.",
code: "CANNOT_FIND",
id: "7a55f0d7-8e06-4a7e-9c77-ee7d59b25a82",
}
},
},
} as const;

View File

@ -109,13 +109,19 @@ async function renderChart() {
span: "day",
});
values = raw.deliverFailed;
} else if (props.src === "user-notes") {
} else if (props.src === "my-notes") {
const raw = await os.api("charts/user/notes", {
limit: 7 * 21,
span: "day",
userId: $i.id,
});
values = raw.total;
values = raw.diffs.normal.map((_, i) => ({
total:
raw.diffs.normal[i] + raw.diffs.reply[i] + raw.diffs.renote[i],
notes: raw.diffs.normal[i],
replies: raw.diffs.reply[i],
renotes: raw.diffs.renote[i],
}));
}
fetching = false;

View File

@ -9,12 +9,16 @@
>{{ i18n.ts._widgets.activity }}</template
>
<template #func
><button v-if="!widgetProps.newStyle" class="_button" @click="toggleView()">
><button
v-if="!widgetProps.newStyle"
class="_button"
@click="toggleView()"
>
<i class="ph-sort-ascending ph-bold ph-lg"></i></button
></template>
<div v-if="widgetProps.newStyle">
<MkHeatmap src="user-notes" />
<MkHeatmap src="my-notes" />
</div>
<div v-else>
<MkLoading v-if="fetching" />