Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2025 The Linux Foundation and each contributor.
SPDX-License-Identifier: MIT
-->
<template>
<div class="flex items-center gap-2">
<div class="flex items-center gap-1">
<template v-if="badges.length > 0">
<lfx-popover
v-for="(count, tier) in badgeCountByTier"
Expand All @@ -13,12 +13,13 @@ SPDX-License-Identifier: MIT
:allow-pass-through="true"
>
<lfx-chip
size="xsmall"
:style="{ background: getBadgeColor(tier as BadgeTier) }"
class="flex items-center gap-1"
class="flex items-center gap-0.5 !px-1.5"
>
<lfx-icon
name="hexagon"
:size="12"
:size="10"
class="text-white"
/>
<span class="text-white text-xs font-semibold">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ SPDX-License-Identifier: MIT
</template>
</lfx-popover>
</td>
<td class="w-1/12 py-4 px-2 whitespace-nowrap">
<td class="w-2/12 py-4 px-2 whitespace-nowrap">
{{ formatNumber(props.project.contributorCount) }}
</td>
<td class="w-1/12 py-4 px-2 whitespace-nowrap">${{ formatNumberShort(props.project.softwareValue || 0) }}</td>
<td class="w-3/12 py-4 px-2 whitespace-nowrap">
<lfx-popover
placement="top"
Expand All @@ -108,8 +107,7 @@ SPDX-License-Identifier: MIT
</template>
<template v-else>
<td class="w-2/12 py-4 px-2 text-neutral-400 whitespace-nowrap">-</td>
<td class="w-1/12 py-4 px-2 text-neutral-400 whitespace-nowrap">-</td>
<td class="w-1/12 py-4 px-2 text-neutral-400 whitespace-nowrap">-</td>
<td class="w-2/12 py-4 px-2 text-neutral-400 whitespace-nowrap">-</td>
<td class="w-3/12 py-4 px-2 text-neutral-400 whitespace-nowrap">-</td>
<td class="w-2/12 py-4 px-2 text-neutral-400 whitespace-nowrap">-</td>
</template>
Expand Down Expand Up @@ -175,15 +173,6 @@ SPDX-License-Identifier: MIT
class="text-neutral-500"
/>
<span>{{ formatNumber(props.project.contributorCount) }}</span>
<template v-if="props.project.softwareValue">
<span class="text-neutral-400">・</span>
<lfx-icon
name="circle-dollar"
:size="12"
class="text-neutral-500"
/>
<span>${{ formatNumberShort(props.project.softwareValue) }}</span>
</template>
</template>
<template v-else>
<span class="text-neutral-400">No data available</span>
Expand All @@ -200,7 +189,7 @@ import type { ProjectInsights } from '~~/types/project';
import LfxOrganizationLogo from '~/components/uikit/organization-logo/organization-logo.vue';
import LfxArchivedTag from '~/components/shared/components/archived-tag.vue';
import LfxTooltip from '~/components/uikit/tooltip/tooltip.vue';
import { formatNumber, formatNumberShort } from '~/components/shared/utils/formatter';
import { formatNumber } from '~/components/shared/utils/formatter';
import { LfxRoutes } from '~/components/shared/types/routes';
import LfxHealthScore from '~/components/shared/components/health-score.vue';
import LfxHealthScoreDetails from '~/components/modules/collection/components/details/health-score-details.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ const { scrollTop } = useScroll();
const allTabs = computed(() => collectionTabs(user.value));

const collectionTab = computed(() => allTabs.value.find((tab) => tab.type === props.type) || allTabs.value[0]);
const headerBackgroundStyle = computed(() => headerBackground(props.type, props.collection?.color));
const headerBackgroundStyle = computed(() => headerBackground());

const projectCount = computed(() => (props.collection?.projectCount || 0) + (props.collection?.repositoryCount || 0));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,8 @@ export const collectionTabs = (_user?: User | null): CollectionTypesTabs[] => {
return tabs;
};

// This only applies to the collection details page header
export const headerBackground = (type?: CollectionType, curatedColor?: string | null) => {
switch (type) {
case CollectionTypeEnum.CURATED:
return {
background: curatedColor
? `linear-gradient(0deg, ${curatedColor}00, ${curatedColor}0D), var(--White, #FFF)`
: 'linear-gradient(0deg, #0F172B00, #0F172B0D), var(--White, #FFF)',
};
case CollectionTypeEnum.COMMUNITY:
return {
background: 'linear-gradient(0deg, #009AFF00, #009AFF0D), var(--White, #FFF)',
};
default:
return {
background: 'linear-gradient(0deg, #8E51FF00, #8E51FF0D), var(--White, #FFF)',
};
}
};
// This only applies to the collection details page header.
// Collections v2 (IN-1194): headers use a plain, consistent background — no gradient — on every collection type.
export const headerBackground = () => ({
background: 'var(--White, #FFF)',
});
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ SPDX-License-Identifier: MIT
</th>
<th class="w-2/12 py-5 px-2 text-left whitespace-nowrap font-semibold">Health Score</th>
<th
class="w-1/12 py-5 px-2 text-left whitespace-nowrap cursor-pointer group"
class="w-2/12 py-5 px-2 text-left whitespace-nowrap cursor-pointer group"
@click="handleSort('contributorCount')"
>
<span class="inline-flex items-center gap-1">
Expand All @@ -65,7 +65,6 @@ SPDX-License-Identifier: MIT
/>
</span>
</th>
<th class="w-1/12 py-5 px-2 text-left whitespace-nowrap font-semibold">Software value</th>
<th class="w-3/12 py-5 px-2 text-left whitespace-nowrap font-semibold">
Contributor/Organization dependency
</th>
Expand Down
Loading