@@ -9,30 +9,56 @@ SPDX-License-Identifier: MIT
99 :tabs =" tabsOptions"
1010 >
1111 <template #slotItem =" { option } " >
12- <div class =" flex flex-col gap-2 items-start" >
12+ <lfx-tooltip
13+ class =" !w-full"
14+ :allow-pass-through =" true"
15+ :disabled =" scoreDisplay[option.value as keyof typeof scoreDisplay]"
16+ >
17+ <template #content >
18+ <p
19+ v-if =" !scoreDisplay[option.value as keyof typeof scoreDisplay]"
20+ class =" max-w-60"
21+ >
22+ {{ option.label }} metrics are unavailable because the required data isn't available for this project.
23+ <a
24+ :href =" links.securityScore"
25+ target =" _blank"
26+ rel =" noopener noreferrer"
27+ class =" text-brand-500"
28+ >Learn more</a
29+ >
30+ </p >
31+ </template >
1332 <div
14- class =" text-sm tab-label "
33+ class =" flex flex-col gap-2 items-start "
1534 :class =" {
16- 'text-neutral-400': !scoreDisplay[option.value as keyof typeof scoreDisplay],
17- 'text-neutral-900': scoreDisplay[option.value as keyof typeof scoreDisplay],
35+ 'cursor-not-allowed': !scoreDisplay[option.value as keyof typeof scoreDisplay],
1836 }"
1937 >
20- {{ option.label }}
21- </div >
22- <div class =" text-sm text-gray-500 w-full" >
23- <lfx-skeleton-state
24- :status =" status"
25- height =" .188rem"
26- width =" 100%"
38+ <div
39+ class =" text-sm tab-label"
40+ :class =" {
41+ 'text-neutral-400': !scoreDisplay[option.value as keyof typeof scoreDisplay],
42+ 'text-neutral-900': scoreDisplay[option.value as keyof typeof scoreDisplay],
43+ }"
2744 >
28- <lfx-progress-bar
29- size =" small"
30- :values =" [getValues(option.value)]"
31- :color =" getColor(getValues(option.value))"
32- />
33- </lfx-skeleton-state >
45+ {{ option.label }}
46+ </div >
47+ <div class =" text-sm text-gray-500 w-full" >
48+ <lfx-skeleton-state
49+ :status =" status"
50+ height =" .188rem"
51+ width =" 100%"
52+ >
53+ <lfx-progress-bar
54+ size =" small"
55+ :values =" [getValues(option.value)]"
56+ :color =" getColor(getValues(option.value))"
57+ />
58+ </lfx-skeleton-state >
59+ </div >
3460 </div >
35- </div >
61+ </lfx-tooltip >
3662 </template >
3763 </lfx-tabs >
3864 <template
@@ -85,6 +111,8 @@ import type { ScoreDisplay } from '~~/types/overview/score-display.types';
85111import LfxProjectLoadState from ' ~~/app/components/modules/project/components/shared/load-state.vue' ;
86112import LfxSkeletonState from ' ~/components/modules/project/components/shared/skeleton-state.vue' ;
87113import type { WidgetArea } from ' ~/components/modules/widget/types/widget-area' ;
114+ import { links } from ' ~/config/links' ;
115+ import LfxTooltip from ' ~/components/uikit/tooltip/tooltip.vue' ;
88116
89117const props = defineProps <{
90118 trustScoreSummary: TrustScoreSummary | undefined ;
0 commit comments