mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
feat: smaller qa points
This commit is contained in:
@@ -29,6 +29,7 @@ import type {
|
||||
ContentCardProject,
|
||||
ContentCardVersion,
|
||||
ContentOwner,
|
||||
ContentSource,
|
||||
} from '../types'
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
@@ -46,6 +47,7 @@ interface Props {
|
||||
version?: ContentCardVersion
|
||||
versionLink?: string | RouteLocationRaw
|
||||
owner?: ContentOwner
|
||||
source?: ContentSource
|
||||
enabled?: boolean
|
||||
installing?: boolean
|
||||
hasUpdate?: boolean
|
||||
@@ -68,6 +70,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
version: undefined,
|
||||
versionLink: undefined,
|
||||
owner: undefined,
|
||||
source: undefined,
|
||||
enabled: undefined,
|
||||
installing: false,
|
||||
hasUpdate: false,
|
||||
@@ -196,8 +199,32 @@ const deleteHovered = ref(false)
|
||||
</div>
|
||||
|
||||
<div class="flex min-w-0 items-center gap-1">
|
||||
<template v-if="source">
|
||||
<AutoLink
|
||||
:target="
|
||||
typeof source.link === 'string' && source.link.startsWith('http')
|
||||
? '_blank'
|
||||
: undefined
|
||||
"
|
||||
:to="source.link"
|
||||
class="flex min-w-0 items-center gap-1 !decoration-secondary"
|
||||
:class="{ 'hover:underline': source.link }"
|
||||
>
|
||||
<Avatar
|
||||
:src="source.project.icon_url"
|
||||
:alt="source.project.title"
|
||||
:tint-by="source.project.id"
|
||||
size="1.25rem"
|
||||
no-shadow
|
||||
class="shrink-0 rounded-md"
|
||||
/>
|
||||
<span class="truncate text-sm leading-5 text-secondary">
|
||||
{{ source.project.title }}
|
||||
</span>
|
||||
</AutoLink>
|
||||
</template>
|
||||
<AutoLink
|
||||
v-if="owner"
|
||||
v-else-if="owner"
|
||||
:target="
|
||||
typeof owner.link === 'string' && owner.link.startsWith('http')
|
||||
? '_blank'
|
||||
|
||||
Reference in New Issue
Block a user