Skip to content

Commit

Permalink
feat: Transaction details page hints (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
janmichek authored Jun 29, 2023
1 parent 09f88f5 commit 635e6ac
Show file tree
Hide file tree
Showing 38 changed files with 511 additions and 52 deletions.
2 changes: 1 addition & 1 deletion src/components/AccountTransactionsTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</template>

<script setup>
import { transactionsHints } from '../utils/hints/transactionsHints'
import { transactionsHints } from '@/utils/hints/transactionsHints'
import { accountHints } from '@/utils/hints/accountHints'
import TransactionCell from '@/components/TransactionCell'
import ValueHashEllipsed from '@/components/ValueHashEllipsed'
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContractCallTransactionsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<th>Hash</th>
<th>Time</th>
<th>Caller</th>
<th>Entry Point</th>
<th>Entrypoint</th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContractCallTransactionsTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</tr>
<tr class="contract-call-transactions-table-condensed__row">
<th class="contract-call-transactions-table-condensed__header">
Entry Point
Entrypoint
</th>
<td class="contract-call-transactions-table-condensed__data">
<app-chip
Expand Down
8 changes: 4 additions & 4 deletions src/components/ContractsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
</hint-tooltip>
</th>
<th>
Created
Created By
<hint-tooltip>
{{ contractsHints.contractCreated }}
{{ contractsHints.createdBy }}
</hint-tooltip>
</th>
<th>
Hash
<hint-tooltip>
{{ contractsHints.contractTxHash }}
{{ contractsHints.hash }}
</hint-tooltip>
</th>
<th>
Created By
<hint-tooltip>
{{ contractsHints.contractCreator }}
{{ contractsHints.creator }}
</hint-tooltip>
</th>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions src/components/ContractsTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<tr class="contracts-table-condensed__row">
<th class="contracts-table-condensed__header">
<app-tooltip>
Created
Created By
<template #tooltip>
{{ contractsHints.contractCreated }}
{{ contractsHints.createdBy }}
</template>
</app-tooltip>
</th>
Expand All @@ -41,7 +41,7 @@
<app-tooltip>
Hash
<template #tooltip>
{{ contractsHints.contractTxHash }}
{{ contractsHints.hash }}
</template>
</app-tooltip>
</th>
Expand All @@ -56,7 +56,7 @@
<app-tooltip>
Created By
<template #tooltip>
{{ contractsHints.contractCreator }}
{{ contractsHints.creator }}
</template>
</app-tooltip>
</th>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OracleEventsQueryPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</dd>

<dt class="oracle-events-query-panel_term">
Response Lifetime:
Response TTL:
<hint-tooltip>
{{ oraclesHints.responseTtl }}
</hint-tooltip>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TransactionCellNameUpdateTx.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{ transactionData.name_ttl }}
</app-chip>
<template #tooltip>
Lifetime
TTL
</template>
</app-tooltip>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TransactionCellOracleExtendTx.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{ transactionData.oracle_ttl.value }}
</app-chip>
<template #tooltip>
Lifetime
TTL
</template>
</app-tooltip>
</template>
Expand Down
25 changes: 25 additions & 0 deletions src/components/TransactionGeneralPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<tr class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
Keyblock Height
<hint-tooltip>
{{ transactionsHints.keyblockHeight }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
{{ transactionDetails.blockHeight }}
Expand All @@ -30,6 +33,9 @@
<tr class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
Keyblock Confirmations
<hint-tooltip>
{{ transactionsHints.keyblockConfirmations }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
{{ transactionDetails.confirmations }}
Expand All @@ -38,6 +44,9 @@
<tr class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
Status
<hint-tooltip>
{{ transactionsHints.status }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
<app-chip
Expand All @@ -57,6 +66,9 @@
class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
Microblock Hash
<hint-tooltip>
{{ transactionsHints.microblockHash }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
<span class="transaction-general-panel__hash">
Expand All @@ -72,6 +84,9 @@
class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
Time
<hint-tooltip>
{{ transactionsHints.time }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
<datetime-label :datetime="transactionDetails.created"/>
Expand All @@ -80,6 +95,9 @@
<tr class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
Fee
<hint-tooltip>
{{ transactionsHints.fee }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
{{ formatAePrice(formatAettosToAe(transactionDetails.fee), null) }}
Expand All @@ -88,6 +106,9 @@
<tr class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
Nonce
<hint-tooltip>
{{ transactionsHints.nonce }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
{{ transactionDetails.nonce }}
Expand All @@ -96,6 +117,9 @@
<tr class="transaction-general-panel__row">
<th class="transaction-general-panel__table-header">
API links
<hint-tooltip>
{{ transactionsHints.apiLinks }}
</hint-tooltip>
</th>
<td class="transaction-general-panel__data">
<div class="transaction-general-panel__container">
Expand Down Expand Up @@ -125,6 +149,7 @@
</template>

<script setup>
import { transactionsHints } from '@/utils/hints/transactionsHints'
import AppPanel from '@/components/AppPanel'
import AppChip from '@/components/AppChip'
import AppIcon from '@/components/AppIcon'
Expand Down
25 changes: 19 additions & 6 deletions src/components/TransactionPointersPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<tr class="transaction-pointers-panel__row">
<th class="transaction-pointers-panel__table-header">
Account
<hint-tooltip>
{{ namesHints.accountPointer }}
</hint-tooltip>
</th>
<td class="transaction-pointers-panel__data">
<app-link
Expand All @@ -18,9 +21,9 @@
<span class="transaction-pointers-panel__link-text">
{{ pointers.account_pubkey }}
</span>
<span class="transaction-pointers-panel__link-text-ellipse">{{
formatEllipseHash(pointers.account_pubkey)
}}</span>
<span class="transaction-pointers-panel__link-text-ellipse">
{{ formatEllipseHash(pointers.account_pubkey) }}
</span>
</app-link>
<template v-else>
---
Expand All @@ -30,6 +33,9 @@
<tr class="transaction-pointers-panel__row">
<th class="transaction-pointers-panel__table-header">
Channel
<hint-tooltip>
{{ namesHints.channelPointer }}
</hint-tooltip>
</th>
<td class="transaction-pointers-panel__data">
{{ formatNullable(pointers.channel) }}
Expand All @@ -38,6 +44,9 @@
<tr class="transaction-pointers-panel__row">
<th class="transaction-pointers-panel__table-header">
Smart Contract
<hint-tooltip>
{{ namesHints.contractPointer }}
</hint-tooltip>
</th>
<td class="transaction-pointers-panel__data">
<app-link
Expand All @@ -46,9 +55,9 @@
<span class="transaction-pointers-panel__link-text">
{{ pointers.contract_pubkey }}
</span>
<span class="transaction-pointers-panel__link-text-ellipse">{{
formatEllipseHash(pointers.contract_pubkey)
}}</span>
<span class="transaction-pointers-panel__link-text-ellipse">
{{ formatEllipseHash(pointers.contract_pubkey) }}
</span>
</app-link>
<template v-else>
---
Expand All @@ -58,6 +67,9 @@
<tr class="transaction-pointers-panel__row">
<th class="transaction-pointers-panel__table-header">
Oracle
<hint-tooltip>
{{ namesHints.oraclePointer }}
</hint-tooltip>
</th>
<td class="transaction-pointers-panel__data">
{{ formatNullable(pointers.oracle_pubkey) }}
Expand All @@ -69,6 +81,7 @@
</template>

<script setup>
import { namesHints } from '@/utils/hints/namesHints'
import AppPanel from '@/components/AppPanel'
import { formatNullable } from '@/utils/format'
Expand Down
13 changes: 13 additions & 0 deletions src/components/TransactionTypeTableChannelCloseMutualTx.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<tr class="transaction-type-panel-channel-close-mutual-tx__row">
<th class="transaction-type-panel-channel-close-mutual-tx__table-header">
Channel ID
<hint-tooltip>
{{ stateChannelsHints.stateChannelId }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-mutual-tx__data">
<app-link :to="`/state-channels/${transactionData.channel_id}`">
Expand All @@ -14,6 +17,9 @@
<tr class="transaction-type-panel-channel-close-mutual-tx__row">
<th class="transaction-type-panel-channel-close-mutual-tx__table-header">
Initiator / Amount
<hint-tooltip>
{{ stateChannelsHints.initiatorCloseAmount }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-mutual-tx__data">
<app-link :to="`/accounts/${transactionData.channel.initiator}`">
Expand All @@ -31,6 +37,9 @@
<tr class="transaction-type-panel-channel-close-mutual-tx__row">
<th class="transaction-type-panel-channel-close-mutual-tx__table-header">
Responder / Amount
<hint-tooltip>
{{ stateChannelsHints.responderCloseAmount }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-mutual-tx__data">
<app-link :to="`/accounts/${transactionData.channel.responder}`">
Expand All @@ -48,6 +57,9 @@
<tr class="transaction-type-panel-channel-close-mutual-tx__row">
<th class="transaction-type-panel-channel-close-mutual-tx__table-header">
Sent By
<hint-tooltip>
{{ stateChannelsHints.sentBy }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-mutual-tx__data">
<app-link :to="`/accounts/${transactionData.from_id}`">
Expand All @@ -60,6 +72,7 @@
</template>

<script setup>
import { stateChannelsHints } from '@/utils/hints/stateChannelsHints'
import AppLink from '@/components/AppLink'
import { formatAePrice, formatAettosToAe } from '@/utils/format'
Expand Down
16 changes: 16 additions & 0 deletions src/components/TransactionTypeTableChannelCloseSoloTx.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<tr class="transaction-type-panel-channel-close-solo-tx__row">
<th class="transaction-type-panel-channel-close-solo-tx__table-header">
Channel ID
<hint-tooltip>
{{ stateChannelsHints.stateChannelId }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-solo-tx__data">
<app-link :to="`/state-channels/${transactionData.channel_id}`">
Expand All @@ -14,6 +17,9 @@
<tr class="transaction-type-panel-channel-close-solo-tx__row">
<th class="transaction-type-panel-channel-close-solo-tx__table-header">
Round
<hint-tooltip>
{{ stateChannelsHints.closeRound }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-solo-tx__data">
{{ transactionData.round }}
Expand All @@ -22,6 +28,9 @@
<tr class="transaction-type-panel-channel-close-solo-tx__row">
<th class="transaction-type-panel-channel-close-solo-tx__table-header">
Initiator
<hint-tooltip>
{{ stateChannelsHints.initiator }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-solo-tx__data">
<app-link :to="`/accounts/${transactionData.channel.initiator}`">
Expand All @@ -32,6 +41,9 @@
<tr class="transaction-type-panel-channel-close-solo-tx__row">
<th class="transaction-type-panel-channel-close-solo-tx__table-header">
Responder
<hint-tooltip>
{{ stateChannelsHints.responder }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-solo-tx__data">
<app-link :to="`/accounts/${transactionData.channel.responder}`">
Expand All @@ -42,6 +54,9 @@
<tr class="transaction-type-panel-channel-close-solo-tx__row">
<th class="transaction-type-panel-channel-close-solo-tx__table-header">
Proposed By
<hint-tooltip>
{{ stateChannelsHints.closeProposedBy }}
</hint-tooltip>
</th>
<td class="transaction-type-panel-channel-close-solo-tx__data">
<app-link :to="`/accounts/${transactionData.from_id}`">
Expand All @@ -54,6 +69,7 @@
</template>

<script setup>
import { stateChannelsHints } from '@/utils/hints/stateChannelsHints'
import AppLink from '@/components/AppLink'
defineProps({
Expand Down
Loading

0 comments on commit 635e6ac

Please sign in to comment.