Skip to content

Commit

Permalink
label pending cl rewards on blocks table (#427)
Browse files Browse the repository at this point in the history
* label pending cl rewards on blocks table

* Fix logic and styling

---------

Co-authored-by: D13ce <[email protected]>
  • Loading branch information
MauserBitfly and D13ce authored Jun 11, 2024
1 parent a1a745a commit 7996f9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions frontend/components/block/table/BlockTableRewardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ defineProps<Props>()
<template>
<BcTooltip v-if="status === 'success' && reward" class="combine-rewards">
<BcFormatValue :value="reward?.el" :no-tooltip="true" />
<BcFormatValue :value="reward?.cl" :no-tooltip="true" />
<BcFormatValue v-if="reward?.cl && reward.cl != '0'" :value="reward?.cl" :no-tooltip="true" />
<span v-else>{{ $t('dashboard.validator.blocks.cl_pending') }}</span>
<template #tooltip>
<div>
<div class="tt-row">
Expand All @@ -20,7 +21,8 @@ defineProps<Props>()
</div>
<div class="tt-row">
<span>{{ $t('dashboard.validator.blocks.cl_rewards') }}: </span>
<BcFormatValue :value="reward?.cl" :no-tooltip="true" :full-value="true" />
<BcFormatValue v-if="reward?.cl && reward.cl != '0'" :value="reward?.cl" :no-tooltip="true" :full-value="true" />
<span v-else>{{ $t('dashboard.validator.blocks.pending') }}</span>
</div>
</div>
</template>
Expand All @@ -40,7 +42,7 @@ defineProps<Props>()
display: inline-flex;
flex-direction: column;
>div:last-child {
>div:last-child, >span:last-child {
font-size: var(--small_text_font_size);
color: var(--text-color-discreet);
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@
"search_placeholder": "Index, Public Key, Group",
"search_placeholder_public": "Index, Public Key",
"el_rewards": "Execution Layer Reward",
"cl_rewards": "Consensus Layer Reward"
"cl_rewards": "Consensus Layer Reward",
"cl_pending": "CL Pending",
"pending": "Pending"
},
"rewards": {
"title": "Rewards",
Expand Down

0 comments on commit 7996f9f

Please sign in to comment.