Skip to content

Commit

Permalink
feat: Add dedicated columns to name tables (#631)
Browse files Browse the repository at this point in the history
Co-authored-by: Michele F. <michele-franchi@users.noreply.github.com>
  • Loading branch information
janmichek and michele-franchi committed Jan 22, 2024
1 parent e7350de commit fd5a31b
Show file tree
Hide file tree
Showing 9 changed files with 520 additions and 463 deletions.
6 changes: 0 additions & 6 deletions src/components/KeyblockDetailsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,5 @@ const isNextKeyblockMined = computed(() =>
}
}
}
&__keyblock-link--disabled {
cursor: not-allowed;
opacity: 0.3;
pointer-events: none;
}
}
</style>
16 changes: 11 additions & 5 deletions src/components/NamesActiveTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
{{ namesHints.buyer }}
</hint-tooltip>
</th>
<th>
Price
<hint-tooltip>
{{ namesHints.price }}
</hint-tooltip>
</th>
<th>
Owner
<hint-tooltip>
Expand Down Expand Up @@ -50,11 +56,11 @@
:datetime="name.expiration"/>
</td>
<td>
<div>
<value-hash-ellipsed
:hash="name.buyer"
:link-to="`/accounts/${name.buyer}`"/>
</div>
<value-hash-ellipsed
:hash="name.buyer"
:link-to="`/accounts/${name.buyer}`"/>
</td>
<td>
<app-chip
variant="secondary"
class="names-active-table__price-label">
Expand Down
12 changes: 12 additions & 0 deletions src/components/NamesActiveTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@
:hash="name.buyer"
:link-to="`/accounts/${name.buyer}`"
class="names-active-table-condensed__buyer"/>
</td>
</tr>
<tr class="names-active-table-condensed__row">
<th class="names-active-table-condensed__header">
<app-tooltip>
Price
<template #tooltip>
{{ namesHints.price }}
</template>
</app-tooltip>
</th>
<td class="names-active-table-condensed__data">
<app-chip variant="secondary">
{{ formatAePrice(name.fee) }}
</app-chip>
Expand Down
18 changes: 12 additions & 6 deletions src/components/NamesExpiredTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
{{ namesHints.lastBuyer }}
</hint-tooltip>
</th>
<th>
Last Price
<hint-tooltip>
{{ namesHints.lastPrice }}
</hint-tooltip>
</th>
<th>
Last Owner
<hint-tooltip>
Expand All @@ -43,12 +49,12 @@
:datetime="name.expiration"/>
</td>
<td>
<div>
<value-hash-ellipsed
v-if="name.lastBuyer"
:hash="name.lastBuyer"
:link-to="`/accounts/${name.lastBuyer}`"/>
</div>
<value-hash-ellipsed
v-if="name.lastBuyer"
:hash="name.lastBuyer"
:link-to="`/accounts/${name.lastBuyer}`"/>
</td>
<td>
<app-chip
variant="secondary"
class="names-expired-table__price-label">
Expand Down
12 changes: 12 additions & 0 deletions src/components/NamesExpiredTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@
class="names-expired-table-condensed__last-buyer"
:hash="name.lastBuyer"
:link-to="`/accounts/${name.lastBuyer}`"/>
</td>
</tr>
<tr class="names-expired-table-condensed__row">
<th class="names-expired-table-condensed__header">
<app-tooltip>
Last Price
<template #tooltip>
{{ namesHints.lastPrice }}
</template>
</app-tooltip>
</th>
<td class="names-expired-table-condensed__data">
<app-chip variant="secondary">
{{ formatAePrice(name.fee) }}
</app-chip>
Expand Down
20 changes: 13 additions & 7 deletions src/components/NamesInAuctionTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
{{ namesHints.highestBid }}
</hint-tooltip>
</th>
<th>
Highest Bidder
<hint-tooltip>
{{ namesHints.highestBidder }}
</hint-tooltip>
</th>
<th>
Bid Count
<hint-tooltip>
Expand All @@ -43,17 +49,19 @@
:datetime="name.expiration"/>
</td>
<td>
<div>
<value-hash-ellipsed
:hash="name.highestBidder"
:link-to="`/accounts/${name.highestBidder}`"/>
</div>
<app-chip
variant="secondary"
class="names-in-auction-table__price-label">
{{ formatAePrice(name.bid) }}
</app-chip>
</td>
<td>
<div>
<value-hash-ellipsed
:hash="name.highestBidder"
:link-to="`/accounts/${name.highestBidder}`"/>
</div>
</td>
<td>
{{ name.bidCount }}
</td>
Expand All @@ -63,9 +71,7 @@
</template>

<script setup>
import AppChip from '@/components/AppChip'
import AppLink from '@/components/AppLink'
import { formatAePrice } from '@/utils/format'
import ValueHashEllipsed from '@/components/ValueHashEllipsed'
import { namesHints } from '@/utils/hints/namesHints'
Expand Down
18 changes: 15 additions & 3 deletions src/components/NamesInAuctionTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,26 @@
</template>
</app-tooltip>
</th>
<td class="names-in-auction-table-condensed__data">
<app-chip variant="secondary">
{{ formatAePrice(name.bid) }}
</app-chip>
</td>
</tr>
<tr class="names-in-auction-table-condensed__row">
<th class="names-in-auction-table-condensed__header">
<app-tooltip>
Highest Bidder
<template #tooltip>
{{ namesHints.highestBidder }}
</template>
</app-tooltip>
</th>
<td class="names-in-auction-table-condensed__data">
<value-hash-ellipsed
:hash="name.highestBidder"
:link-to="`/accounts/${name.highestBidder}`"
class="names-in-auction-table-condensed__highest-bid"/>
<app-chip variant="secondary">
{{ formatAePrice(name.bid) }}
</app-chip>
</td>
</tr>
<tr class="names-in-auction-table-condensed__row">
Expand Down
9 changes: 6 additions & 3 deletions src/utils/hints/namesHints.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ export const namesHints = {
name: 'The æternity naming system (AENS) is a distributed, open, and built-in naming system on the æternity blockchain. Each .chain name is a unique, transferrable identifier that provides a way for users to map human-readable names to blockchain resources such as accounts, smart contracts, oracles, or state channels.',
nameInAuction: 'Unique identifier that may be configured to point to accounts, contracts, or oracles. names shorter than 13 characters are always auctioned.',
expires: 'Keyblock height and estimated date and time when the name will be detached from the account. After expiration, the name enters into a revoked state and can be claimed again after a fixed timeout of 2016 keyblocks.',
buyer: 'Account that paid the shown price to claim the name.',
buyer: 'Account that paid claim the name.',
price: 'Price paid to claim the name.',
owner: 'Owner of the name.',
pointsTo: 'The account the name points to.',
highestBid: 'Account of the highest bidder and the highest bid price. Required minimum bid increase is 5%.',
highestBid: 'Highest bid price. Required minimum bid increase is 5%.',
highestBidder: 'Account of the highest bidder.',
bidCount: 'Amount of bids in the auction.',
ends: 'Keyblock height and estimated date and time when the auction ends.',
expired: 'Keyblock height and estimated date and time when the name has been detached from the account. Name passed revoked period and can be claimed again.',
revoked: 'Keyblock height and estimated date and time when the name has been detached from the account. Name is in revoked state and can be claimed again after a fixed timeout of 2016 keyblocks after expiration.',
lastBuyer: 'Account that previously paid the shown price to claim the name.',
lastBuyer: 'Account that previously paid to claim the name.',
lastPrice: 'Price paid to claim the name.',
lastOwner: 'Last owner of the name.',
bidder: 'Account of the highest bidder.',
bid: 'Price of the highest bid.',
Expand Down

0 comments on commit fd5a31b

Please sign in to comment.