2024-09-07 10:38:18 +03:00
|
|
|
<script setup lang="ts">
|
2023-01-08 09:21:09 +03:00
|
|
|
import type { mastodon } from 'masto'
|
2022-12-11 13:52:36 +03:00
|
|
|
|
|
|
|
const {
|
|
|
|
history,
|
|
|
|
maxDay = 2,
|
2024-02-21 18:20:08 +03:00
|
|
|
} = defineProps<{
|
2023-01-08 09:21:09 +03:00
|
|
|
history: mastodon.v1.TagHistory[]
|
2022-12-11 13:52:36 +03:00
|
|
|
maxDay?: number
|
|
|
|
}>()
|
|
|
|
|
2024-02-21 18:20:08 +03:00
|
|
|
const ongoingHot = computed(() => history.slice(0, maxDay))
|
2022-12-11 13:52:36 +03:00
|
|
|
|
2024-02-21 18:20:08 +03:00
|
|
|
const people = computed(() =>
|
|
|
|
ongoingHot.value.reduce((total: number, item) => total + (Number(item.accounts) || 0), 0),
|
2022-12-11 13:52:36 +03:00
|
|
|
)
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<p>
|
2023-09-06 15:51:01 +03:00
|
|
|
{{ $t('command.n_people_in_the_past_n_days', [people, maxDay]) }}
|
2022-12-11 13:52:36 +03:00
|
|
|
</p>
|
|
|
|
</template>
|