Skip to content

Commit 658a932

Browse files
committed
fix: remove disabled tab
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
1 parent 46522dc commit 658a932

File tree

1 file changed

+22
-54
lines changed
  • frontend/app/components/modules/project/components/overview/score-details

1 file changed

+22
-54
lines changed

frontend/app/components/modules/project/components/overview/score-details/score-tab-view.vue

Lines changed: 22 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,60 +9,30 @@ SPDX-License-Identifier: MIT
99
:tabs="tabsOptions"
1010
>
1111
<template #slotItem="{ option }">
12-
<lfx-tooltip
13-
class="!w-full"
14-
:disabled="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>
41-
<div class="flex flex-col gap-2 items-start cursor-not-allowed">
42-
<div
43-
class="text-sm tab-label"
44-
:class="{
45-
'text-neutral-400': !scoreDisplay[option.value as keyof typeof scoreDisplay],
46-
'text-neutral-900': scoreDisplay[option.value as keyof typeof scoreDisplay],
47-
}"
12+
<div class="flex flex-col gap-2 items-start">
13+
<div
14+
class="text-sm tab-label"
15+
:class="{
16+
'text-neutral-400': !scoreDisplay[option.value as keyof typeof scoreDisplay],
17+
'text-neutral-900': scoreDisplay[option.value as keyof typeof scoreDisplay],
18+
}"
19+
>
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%"
4827
>
49-
{{ option.label }}
50-
</div>
51-
<div class="text-sm text-gray-500 w-full">
52-
<lfx-skeleton-state
53-
:status="status"
54-
height=".188rem"
55-
width="100%"
56-
>
57-
<lfx-progress-bar
58-
size="small"
59-
:values="[getValues(option.value)]"
60-
:color="getColor(getValues(option.value))"
61-
/>
62-
</lfx-skeleton-state>
63-
</div>
28+
<lfx-progress-bar
29+
size="small"
30+
:values="[getValues(option.value)]"
31+
:color="getColor(getValues(option.value))"
32+
/>
33+
</lfx-skeleton-state>
6434
</div>
65-
</lfx-tooltip>
35+
</div>
6636
</template>
6737
</lfx-tabs>
6838
<template
@@ -115,8 +85,6 @@ import type { ScoreDisplay } from '~~/types/overview/score-display.types';
11585
import LfxProjectLoadState from '~~/app/components/modules/project/components/shared/load-state.vue';
11686
import LfxSkeletonState from '~/components/modules/project/components/shared/skeleton-state.vue';
11787
import type { WidgetArea } from '~/components/modules/widget/types/widget-area';
118-
import { links } from '~/config/links';
119-
import LfxTooltip from '~/components/uikit/tooltip/tooltip.vue';
12088
12189
const props = defineProps<{
12290
trustScoreSummary: TrustScoreSummary | undefined;

0 commit comments

Comments
 (0)