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
1.2 KiB
Vue
40 lines
1.2 KiB
Vue
<template>
|
|
<div
|
|
v-if="game"
|
|
v-tooltip="'Change server version'"
|
|
class="min-w-0 flex-none flex-row items-center gap-2 first:!flex"
|
|
>
|
|
<GameIcon aria-hidden="true" class="size-5 shrink-0" />
|
|
<NuxtLink
|
|
v-if="isLink"
|
|
:to="serverId ? `/servers/manage/${serverId}/options/loader` : ''"
|
|
class="flex min-w-0 items-center truncate text-sm font-semibold"
|
|
:class="serverId ? 'hover:underline' : ''"
|
|
>
|
|
<div class="flex flex-row items-center gap-1">
|
|
{{ game[0].toUpperCase() + game.slice(1) }}
|
|
<span v-if="mcVersion">{{ mcVersion }}</span>
|
|
<span v-else class="inline-block h-3 w-12 animate-pulse rounded bg-button-border"></span>
|
|
</div>
|
|
</NuxtLink>
|
|
<div v-else class="flex min-w-0 flex-row items-center gap-1 truncate text-sm font-semibold">
|
|
{{ game[0].toUpperCase() + game.slice(1) }}
|
|
<span v-if="mcVersion">{{ mcVersion }}</span>
|
|
<span v-else class="inline-block h-3 w-16 animate-pulse rounded bg-button-border"></span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { GameIcon } from '@modrinth/assets'
|
|
|
|
defineProps<{
|
|
game: string
|
|
mcVersion: string
|
|
isLink?: boolean
|
|
}>()
|
|
|
|
const route = useNativeRoute()
|
|
const serverId = route.params.id as string
|
|
</script>
|