You've already forked pages
forked from didirus/AstralRinth
* feat: abstract api-client DI into ui package * feat: cross platform page system * feat: tanstack as cross platform useAsyncData * feat: archon servers routes + labrinth billing routes * fix: dont use partial * feat: migrate server list page to tanstack + api-client + re-enabled broken features! * feat: migrate servers manage page to api-client before page system * feat: migrate manage page to page system * fix: type issues * fix: upgrade wrapper bugs * refactor: move state types into api-client * feat: disable financial stuff on app frontend * feat: finalize cross platform page system for now * fix: lint * fix: build issues * feat: remove papaparse * fix: lint * fix: interface error --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
43 lines
1.3 KiB
Vue
43 lines
1.3 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" />
|
|
<AutoLink
|
|
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>
|
|
</AutoLink>
|
|
<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'
|
|
import { useRoute } from 'vue-router'
|
|
|
|
import AutoLink from '../../base/AutoLink.vue'
|
|
|
|
defineProps<{
|
|
game: string
|
|
mcVersion: string
|
|
isLink?: boolean
|
|
}>()
|
|
|
|
const route = useRoute()
|
|
const serverId = route.params.id as string
|
|
</script>
|