mirror of
https://example.com
synced 2024-11-23 20:46:40 +09:00
see if this works
This commit is contained in:
parent
8fa0919810
commit
a6761ec278
3 changed files with 15 additions and 5 deletions
|
@ -41,7 +41,7 @@ export const meta = {
|
|||
message: "Cannot find the following.",
|
||||
code: "CANNOT_FIND",
|
||||
id: "7a55f0d7-8e06-4a7e-9c77-ee7d59b25a82",
|
||||
}
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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" />
|
||||
|
|
Loading…
Reference in a new issue