You've already forked AstralRinth
forked from didirus/AstralRinth
* refactor: migrate to common eslint+prettier configs * fix: prettier frontend * feat: config changes * fix: lint issues * fix: lint * fix: type imports * fix: cyclical import issue * fix: lockfile * fix: missing dep * fix: switch to tabs * fix: continue switch to tabs * fix: rustfmt parity * fix: moderation lint issue * fix: lint issues * fix: ui intl * fix: lint issues * Revert "fix: rustfmt parity" This reverts commit cb99d2376c321d813d4b7fc7e2a213bb30a54711. * feat: revert last rs
40 lines
987 B
Vue
40 lines
987 B
Vue
<script setup lang="ts">
|
|
import type { VersionChannel } from '@modrinth/utils'
|
|
import { defineMessages, useVIntl } from '@vintl/vintl'
|
|
|
|
const { formatMessage } = useVIntl()
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
channel: VersionChannel
|
|
large?: boolean
|
|
}>(),
|
|
{
|
|
large: false,
|
|
},
|
|
)
|
|
|
|
const messages = defineMessages({
|
|
releaseSymbol: {
|
|
id: 'project.versions.channel.release.symbol',
|
|
defaultMessage: 'R',
|
|
},
|
|
betaSymbol: {
|
|
id: 'project.versions.channel.beta.symbol',
|
|
defaultMessage: 'B',
|
|
},
|
|
alphaSymbol: {
|
|
id: 'project.versions.channel.alpha.symbol',
|
|
defaultMessage: 'A',
|
|
},
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
:class="`flex ${large ? 'text-lg w-[2.625rem] h-[2.625rem]' : 'text-sm w-9 h-9'} font-bold justify-center items-center rounded-full ${channel === 'release' ? 'bg-bg-green text-brand-green' : channel === 'beta' ? 'bg-bg-orange text-brand-orange' : 'bg-bg-red text-brand-red'}`"
|
|
>
|
|
{{ channel ? formatMessage(messages[`${channel}Symbol`]) : '?' }}
|
|
</div>
|
|
</template>
|