feat:移除了弹窗,服务器添加sls
This commit is contained in:
29
apps/app-frontend/src/components/ui/InstanceIcon.vue
Normal file
29
apps/app-frontend/src/components/ui/InstanceIcon.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
import { Avatar } from '@modrinth/ui'
|
||||
import { computed } from 'vue'
|
||||
|
||||
import { getDisplayInstanceIcon } from '@/helpers/instance-icons'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
iconPath?: string | null
|
||||
instanceId?: string | null
|
||||
loader?: string | null
|
||||
}>(),
|
||||
{
|
||||
iconPath: null,
|
||||
instanceId: null,
|
||||
loader: null,
|
||||
},
|
||||
)
|
||||
|
||||
const displayIcon = computed(() => getDisplayInstanceIcon(props.iconPath, props.loader))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Avatar
|
||||
:src="displayIcon.url"
|
||||
:tint-by="instanceId"
|
||||
:class="{ '!border-0 !rounded-none !bg-transparent !shadow-none': displayIcon.frameless }"
|
||||
/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user