You've already forked AstralRinth
forked from didirus/AstralRinth
381ea51cce
* fix: files.vue bugs before styling changes * feat: move files tab to shared layout structure * fix: qa * fix: qa * fix: bugs * fix: lint * fix: admonition cleanup with progress + actions * fix: cleanup * fix: modals * fix: admon title * fix: i18n standard * fix: lint + i18n pass * fix: remove transition * fix: type errors * feat: files tab in app * fix: qa * fix: backup item minmax * fix: use ContentPageHeader for server panel * fix: lint * fix: lint * fix: lint * feat: page leave safety * fix: lint * fix: cargo fmt fix * fix: blank in prod * fix: content card table stuff * Revert "fix: blank in prod" This reverts commit 74758fe185cf85a4a20355857f889cb091b97ace. * fix: import * feat: browse worlds/servers flow * fix: worlds tab parity with content tab * fix: perf bug + shader filter pill copy * feat: singleplayer filter * fix: ordering * fix: breadcrumbs * fix: lint * fix: qa * feat: store server proj id when adding to a non-linked instance * fix: lint * fix: i18n + qa * fix: conflict * qa: already installed modal + placeholders not server-specific * fix: qa * fix: add + edit server modals * fix: qa * fix: security * fix: devin flags * fix: lint * chore: change file to break build cache * fix: admon * fix: import path stuff * feat: qa * fix: fmt fmt idiot --------- Signed-off-by: Calum H. <calum@modrinth.com>
58 lines
1.6 KiB
Vue
58 lines
1.6 KiB
Vue
<script setup lang="ts">
|
|
import { GameIcon, LeftArrowIcon } from '@modrinth/assets'
|
|
import { Avatar, ButtonStyled, FormattedTag } from '@modrinth/ui'
|
|
import { convertFileSrc } from '@tauri-apps/api/core'
|
|
import { computed } from 'vue'
|
|
|
|
type Instance = {
|
|
game_version: string
|
|
loader: string
|
|
path: string
|
|
install_stage: string
|
|
icon_path?: string
|
|
name: string
|
|
}
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
instance: Instance
|
|
backTab?: string
|
|
}>(),
|
|
{ backTab: undefined },
|
|
)
|
|
|
|
const instanceLink = computed(() => {
|
|
const base = `/instance/${encodeURIComponent(props.instance.path)}`
|
|
return props.backTab ? `${base}/${props.backTab}` : base
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex justify-between items-center border-0 border-b border-solid border-divider pb-4">
|
|
<router-link :to="instanceLink" tabindex="-1" class="flex flex-col gap-4 text-primary">
|
|
<span class="flex items-center gap-2">
|
|
<Avatar
|
|
:src="instance.icon_path ? convertFileSrc(instance.icon_path) : undefined"
|
|
:alt="instance.name"
|
|
size="48px"
|
|
/>
|
|
<span class="flex flex-col gap-2">
|
|
<span class="font-extrabold bold text-contrast">
|
|
{{ instance.name }}
|
|
</span>
|
|
<span class="text-secondary flex items-center gap-2 font-semibold">
|
|
<GameIcon class="h-5 w-5 text-secondary" />
|
|
<FormattedTag :tag="instance.loader" enforce-type="loader" />
|
|
{{ instance.game_version }}
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</router-link>
|
|
<ButtonStyled>
|
|
<router-link :to="instanceLink"> <LeftArrowIcon /> Back to instance </router-link>
|
|
</ButtonStyled>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="scss"></style>
|