* fix port in server address * fix: invalid args for path * fix page loading * hide labels
33 lines
791 B
Vue
33 lines
791 B
Vue
<script setup lang="ts">
|
|
import { PlayIcon } from '@modrinth/assets'
|
|
|
|
import { formatNumber } from '../../../../../utils'
|
|
import { useVIntl } from '../../../composables'
|
|
import { commonMessages } from '../../../utils'
|
|
import { StatItem } from '../../base'
|
|
|
|
const { formatMessage } = useVIntl()
|
|
|
|
defineProps<{
|
|
recentPlays: number
|
|
hideLabel?: boolean
|
|
}>()
|
|
</script>
|
|
<template>
|
|
<StatItem
|
|
v-tooltip="
|
|
`${formatNumber(recentPlays, true)} recent play${recentPlays === 1 ? '' : 's'} from Modrinth in the past 2 weeks`
|
|
"
|
|
class="smart-clickable:allow-pointer-events w-max"
|
|
>
|
|
<PlayIcon />
|
|
{{
|
|
hideLabel
|
|
? formatNumber(recentPlays, true)
|
|
: formatMessage(commonMessages.projectRecentPlays, {
|
|
count: formatNumber(recentPlays, true),
|
|
})
|
|
}}
|
|
</StatItem>
|
|
</template>
|