feat: more to explore (#360)

This commit is contained in:
Ayaka Rizumu 2022-12-11 18:52:36 +08:00 committed by GitHub
parent a36a26d745
commit 183b1659d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 530 additions and 17 deletions

View file

@ -0,0 +1,23 @@
<script lang="ts" setup>
import type { History } from 'masto'
const {
history,
maxDay = 2,
} = $defineProps<{
history: History[]
maxDay?: number
}>()
const ongoingHot = $computed(() => history.slice(0, maxDay))
const people = $computed(() =>
ongoingHot.reduce((total: number, item) => total + (Number(item.accounts) || 0), 0),
)
</script>
<template>
<p>
{{ $t('command.n-people-in-the-past-n-days', [people, maxDay]) }}
</p>
</template>