@@ -9,30 +9,65 @@ 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+ >
16+ <template #content >
17+ <p
18+ v-if =" !scoreDisplay[option.value as keyof typeof scoreDisplay]"
19+ class =" max-w-60"
20+ >
21+ {{ option.label }} metrics are unavailable because the required data isn't available for this project.
22+ <a
23+ :href =" links.securityScore"
24+ target =" _blank"
25+ class =" text-brand-500"
26+ >Learn more</a
27+ >
28+ </p >
29+ <p
30+ v-else
31+ class =" max-w-60"
32+ >
33+ <a
34+ :href =" links.securityScore"
35+ target =" _blank"
36+ class =" text-brand-500"
37+ >Learn more</a
38+ >
39+ </p >
40+ </template >
1341 <div
14- class =" text-sm tab-label "
42+ class =" flex flex-col gap-2 items-start "
1543 :class =" {
16- 'text-neutral-400': !scoreDisplay[option.value as keyof typeof scoreDisplay],
17- 'text-neutral-900': scoreDisplay[option.value as keyof typeof scoreDisplay],
44+ 'cursor-not-allowed': !scoreDisplay[option.value as keyof typeof scoreDisplay],
1845 }"
1946 >
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%"
47+ <div
48+ class =" text-sm tab-label"
49+ :class =" {
50+ 'text-neutral-400': !scoreDisplay[option.value as keyof typeof scoreDisplay],
51+ 'text-neutral-900': scoreDisplay[option.value as keyof typeof scoreDisplay],
52+ }"
2753 >
28- <lfx-progress-bar
29- size =" small"
30- :values =" [getValues(option.value)]"
31- :color =" getColor(getValues(option.value))"
32- />
33- </lfx-skeleton-state >
54+ {{ option.label }}
55+ </div >
56+ <div class =" text-sm text-gray-500 w-full" >
57+ <lfx-skeleton-state
58+ :status =" status"
59+ height =" .188rem"
60+ width =" 100%"
61+ >
62+ <lfx-progress-bar
63+ size =" small"
64+ :values =" [getValues(option.value)]"
65+ :color =" getColor(getValues(option.value))"
66+ />
67+ </lfx-skeleton-state >
68+ </div >
3469 </div >
35- </div >
70+ </lfx-tooltip >
3671 </template >
3772 </lfx-tabs >
3873 <template
@@ -85,6 +120,8 @@ import type { ScoreDisplay } from '~~/types/overview/score-display.types';
85120import LfxProjectLoadState from ' ~~/app/components/modules/project/components/shared/load-state.vue' ;
86121import LfxSkeletonState from ' ~/components/modules/project/components/shared/skeleton-state.vue' ;
87122import type { WidgetArea } from ' ~/components/modules/widget/types/widget-area' ;
123+ import { links } from ' ~/config/links' ;
124+ import LfxTooltip from ' ~/components/uikit/tooltip/tooltip.vue' ;
88125
89126const props = defineProps <{
90127 trustScoreSummary: TrustScoreSummary | undefined ;
0 commit comments