Skip to content

Commit

Permalink
feat: Microblock details hints (#379)
Browse files Browse the repository at this point in the history
Co-authored-by: luekromanowicz <lromanowicz1@gmail.com>
  • Loading branch information
janmichek and lukeromanowicz authored Jul 26, 2023
1 parent 6bb0996 commit b04cf59
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/DashboardMicroblocksPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
title="Microblocks"
icon-name="microblocks">
<template #tooltip>
Microblocks can be created every 3 seconds by the current leader, are linked to a specific keyblock
and include all types of on-chain transactions. The next leader is incentivized to keep the
microblocks in the blockchain as he receives 40% of the fees of the transactions.
{{ microblocksHints.microblock }}
</template>
<template #header>
<div class="dashboard-microblocks-panel__summary dashboard-microblocks-panel__summary--desktop">
Expand Down Expand Up @@ -39,6 +37,7 @@

<script setup>
import { storeToRefs } from 'pinia'
import { microblocksHints } from '@/utils/hints/microblocksHints'
import AppPanel from '@/components/AppPanel'
import DashboardTransactionPanel from '@/components/DashboardTransactionPanel'
import MicroblocksSequence from '@/components/MicroblocksSequence'
Expand Down
16 changes: 16 additions & 0 deletions src/components/MicroblockDetailsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<tr class="microblock-details-panel__row">
<th class="microblock-details-panel__table-header">
Keyblock
<hint-tooltip>
{{ microblocksHints.keyblock }}
</hint-tooltip>
</th>
<td class="microblock-details-panel__data">
<app-link :to="`/keyblocks/${microblockDetails.prev_key_hash}`">
Expand All @@ -34,6 +37,9 @@
<tr class="microblock-details-panel__row">
<th class="microblock-details-panel__table-header">
Height
<hint-tooltip>
{{ microblocksHints.microblockHeight }}
</hint-tooltip>
</th>
<td class="microblock-details-panel__data">
<app-link :to="`/keyblocks/${microblockDetails.height}`">
Expand All @@ -44,6 +50,9 @@
<tr class="microblock-details-panel__row">
<th class="microblock-details-panel__table-header">
Time
<hint-tooltip>
{{ microblocksHints.time }}
</hint-tooltip>
</th>
<td class="microblock-details-panel__data">
<datetime-label :datetime="microblockDetails.time"/>
Expand All @@ -52,6 +61,9 @@
<tr class="microblock-details-panel__row">
<th class="microblock-details-panel__table-header">
Transactions Count
<hint-tooltip>
{{ microblocksHints.transactionsCount }}
</hint-tooltip>
</th>
<td class="microblock-details-panel__data">
{{ formatNumber(microblockDetails.transactions_count) }}
Expand All @@ -60,6 +72,9 @@
<tr class="microblock-details-panel__row">
<th class="microblock-details-panel__table-header">
API Links
<hint-tooltip>
{{ microblocksHints.apiLinks }}
</hint-tooltip>
</th>
<td class="microblock-details-panel__data">
<div class="microblock-details-panel__container">
Expand Down Expand Up @@ -89,6 +104,7 @@
</template>

<script setup>
import { microblocksHints } from '@/utils/hints/microblocksHints'
import AppPanel from '@/components/AppPanel'
import CopyChip from '@/components/CopyChip'
import AppIcon from '@/components/AppIcon'
Expand Down
5 changes: 5 additions & 0 deletions src/pages/microblocks/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

<page-header>
Microblock
<template #tooltip>
{{ microblocksHints.microblock }}
</template>
</page-header>

<microblock-details-panel
Expand All @@ -17,6 +20,8 @@
<script setup>
import { storeToRefs } from 'pinia'
import { useRoute } from 'nuxt/app'
import { microblocksHints } from '@/utils/hints/microblocksHints'
import { useMicroblockDetailsStore } from '@/stores/microblockDetails'
import PageHeader from '@/components/PageHeader'
import MicroblockDetailsPanel from '@/components/MicroblockDetailsPanel'
Expand Down
6 changes: 6 additions & 0 deletions src/utils/hints/microblocksHints.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export const microblocksHints = {
microblock: 'Microblocks can be created every 3 seconds by the current leader, are linked to a specific keyblock, and include all types of on-chain transactions. The next leader is incentivized to keep the microblocks in the blockchain as he receives 40% of the fees of the transactions.',
keyblock: 'Parent keyblock id to which the microblock is linked.',
microblockHeight: 'Parent keyblock height to which the microblock is linked.',
time: 'Date and time when the microblock has been mined.',
transactionsCount: 'Number of transactions in the microblock.',
apiLinks: 'Links to sources of the microblock data.',
transactionHash: 'Unique identifier of the transaction.',
transactionTime: 'Keyblock height and exact date and time when the transaction was executed by inclusion into a microblock.',
transactionType: 'The type of the transaction depends on its purpose in the æternity ecosystem.',
Expand Down

0 comments on commit b04cf59

Please sign in to comment.