Skip to content

Commit

Permalink
FIX: ssv and obol performance number
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxTheGeeek committed Dec 19, 2024
1 parent 42c96f9 commit 0819518
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
8 changes: 2 additions & 6 deletions launcher/public/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@
}

/*
! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com
*/

/*
Expand Down Expand Up @@ -633,7 +631,7 @@ video {

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden] {
[hidden]:where(:not([hidden="until-found"])) {
display: none;
}

Expand Down Expand Up @@ -4326,9 +4324,7 @@ video {

.bg-zinc-700{
--tw-bg-opacity: 1;

background-color: rgb(63 63 70 / var(--tw-bg-opacity));

background-color: rgb(63 63 70 / var(--tw-bg-opacity, 1));
}

.bg-opacity-80{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,36 @@
<div
class="w-full h-full max-h-7 col-start-1 col-span-full row-span-1 border border-gray-600 rounded-full grid grid-cols-6 bg-[#2a2c30] items-center p-[1px]"
>
<div class="h-full col-start-1 col-end-4 self-center flex justify-start items-center px-2 rounded-l-full">
<span class="text-[10px] text-amber-300 font-normal font-sans text-left">PERFORMANCE</span>
<div
class="h-full col-start-1 col-end-4 self-center flex justify-start items-center px-2 rounded-l-full"
>
<span class="text-[10px] text-amber-300 font-normal font-sans text-left"
>PERFORMANCE</span
>
</div>
<div class="w-full h-full col-start-4 col-span-full rounded-r-full self-center flex justify-center items-center bg-[#151618] px-1">
<div
class="w-full h-full col-start-4 col-span-full rounded-r-full self-center flex justify-center items-center bg-[#151618] px-1"
>
<span class="text-2xs text-gray-300 font-semibold">{{ getPerformance }}</span>
</div>
</div>
</template>

<script setup>
import { computed } from "vue";
import { useStakingStore } from "@/store/theStaking";
import { computed } from "vue";
const stakingStore = useStakingStore();
const getPerformance = computed(() => {
if (stakingStore.selectedServiceToFilter?.service === "SSVNetworkService") {
return stakingStore.ssvStats?.performance ? stakingStore.ssvStats?.performance + "%" : "N/A";
return stakingStore.ssvStats?.performance
? Math.floor(stakingStore.ssvStats?.performance) + "%"
: "N/A";
} else if (stakingStore.selectedServiceToFilter?.service === "CharonService") {
return stakingStore.obolStats?.attestationPerformance ? stakingStore.obolStats?.attestationPerformance.substring(0, 5) + "%" : "N/A";
return stakingStore.obolStats?.attestationPerformance
? Math.floor(stakingStore.obolStats?.attestationPerformance) + "%"
: "N/A";
}
return "N/A";
});
Expand Down

0 comments on commit 0819518

Please sign in to comment.