Files
Modrinth-plus/packages/ui/src/components/project/server/ServerRecentPlays.vue
Truman Gao c4a0008708 fix: invalid args path (#5467)
* fix port in server address

* fix: invalid args for path

* fix page loading

* hide labels
2026-03-04 01:03:12 +01:00

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>