Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions app/components/PackageDependencies.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const sortedOptionalDependencies = computed(() => {
>
<span class="i-carbon:warning-alt w-3 h-3 block" />
</span>
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
<span aria-hidden="true" class="shrink grow" />
<NuxtLink
v-if="getVulnerableDepInfo(dep)"
:to="{
Expand Down Expand Up @@ -155,30 +155,31 @@ const sortedOptionalDependencies = computed(() => {
<li
v-for="peer in sortedPeerDependencies.slice(0, peerDepsExpanded ? undefined : 10)"
:key="peer.name"
class="flex items-center justify-start py-1 text-sm gap-2"
class="flex items-center justify-between py-1 text-sm gap-1 min-w-0"
>
<div class="flex items-center gap-2 min-w-0">
<div class="flex items-center gap-1 shrink-0">
<NuxtLink
:to="{ name: 'package', params: { package: peer.name.split('/') } }"
class="font-mono text-fg-muted hover:text-fg transition-colors duration-200 truncate"
class="font-mono text-fg-muted hover:text-fg transition-colors duration-200"
>
{{ peer.name }}
</NuxtLink>
<span
v-if="peer.optional"
class="px-1 py-0.5 font-mono text-[10px] text-fg-subtle bg-bg-muted border border-border rounded shrink-0"
class="shrink-0 text-fg-muted hover:text-fg transition-colors duration-200 cursor-help inline-flex items-center"
:title="$t('package.dependencies.optional')"
:aria-label="$t('package.dependencies.optional')"
role="img"
>
{{ $t('package.dependencies.optional') }}
<span aria-hidden="true" class="i-carbon:information w-3 h-3 block" />
</span>
</div>
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
<NuxtLink
:to="{
name: 'package',
params: { package: [...peer.name.split('/'), 'v', peer.version] },
}"
class="font-mono text-xs text-fg-subtle max-w-[40%] text-end truncate"
class="font-mono text-xs text-fg-subtle shrink-0"
:title="peer.version"
>
{{ peer.version }}
Expand Down Expand Up @@ -221,7 +222,7 @@ const sortedOptionalDependencies = computed(() => {
>
{{ dep }}
</NuxtLink>
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
<span aria-hidden="true" class="shrink grow" />
<NuxtLink
:to="{ name: 'package', params: { package: [...dep.split('/'), 'v', version] } }"
class="font-mono text-xs text-fg-subtle max-w-[50%] text-end truncate"
Expand Down
Loading