forked from LaconicNetwork/cosmos-explorer
improve tx dialog
This commit is contained in:
@@ -27,7 +27,7 @@ const format = useFormatter();
|
||||
</div>
|
||||
|
||||
<div v-show="tab === 'blocks'" class="bg-base-100 rounded overflow-x-auto">
|
||||
<table class="table w-full">
|
||||
<table class="table w-full table-compact">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="position: relative; z-index: 2;">Height</th>
|
||||
@@ -60,7 +60,7 @@ const format = useFormatter();
|
||||
v-show="tab === 'transactions'"
|
||||
class="bg-base-100 rounded overflow-x-auto"
|
||||
>
|
||||
<table class="table w-full">
|
||||
<table class="table w-full table-compact">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="position: relative; z-index: 2;">Height</th>
|
||||
|
||||
@@ -17,6 +17,8 @@ import { computed } from '@vue/reactivity';
|
||||
import CardStatisticsVertical from '@/components/CardStatisticsVertical.vue';
|
||||
import ProposalListItem from '@/components/ProposalListItem.vue';
|
||||
|
||||
const props = defineProps(['chain']);
|
||||
|
||||
const blockchain = useBlockchain();
|
||||
const store = useIndexModule();
|
||||
const walletStore = useWalletStore();
|
||||
@@ -229,7 +231,7 @@ const color = computed(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-base-100 rounded mt-4 shadow">
|
||||
<div v-if="blockchain.supportModule('governance')" class="bg-base-100 rounded mt-4 shadow">
|
||||
<div class="px-4 pt-4 pb-2 text-lg font-semibold text-main">
|
||||
Active Proposals
|
||||
</div>
|
||||
@@ -246,8 +248,8 @@ const color = computed(() => {
|
||||
{{ walletStore.currentAddress || 'Not Connected' }}
|
||||
<RouterLink
|
||||
v-if="walletStore.currentAddress"
|
||||
class="float-right font-light text-sm cursor-pointert link link-primary no-underline font-medium"
|
||||
to="/wallet/portfolio"
|
||||
class="float-right text-sm cursor-pointert link link-primary no-underline font-medium"
|
||||
:to="`/${chain}/account/${walletStore.currentAddress}`"
|
||||
>More</RouterLink
|
||||
>
|
||||
</div>
|
||||
@@ -294,7 +296,7 @@ const color = computed(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="px-4 pb-4">
|
||||
<div v-if="walletStore.delegations.length > 0" class="px-4 pb-4">
|
||||
<table class="table table-compact w-full table-zebra">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -316,27 +318,28 @@ const color = computed(() => {
|
||||
<td>{{ format.formatToken(item?.balance) }}</td>
|
||||
<td>
|
||||
{{
|
||||
format.formatToken(
|
||||
format.formatTokens(
|
||||
walletStore?.rewards?.rewards?.find(
|
||||
(el) =>
|
||||
el?.validator_address ===
|
||||
item?.delegation?.validator_address
|
||||
)?.reward?.[0]
|
||||
)
|
||||
)?.reward)
|
||||
}}
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<button
|
||||
<label for="delegate"
|
||||
class="btn btn-xs btn-primary btn-ghost text-primary rounded-sm mr-2"
|
||||
@click="dialog.open('delegate', { validator_address: item.delegation.validator_address})"
|
||||
>
|
||||
Delegate
|
||||
</button>
|
||||
<button
|
||||
</label>
|
||||
<label for="withdraw"
|
||||
class="btn btn-xs btn-primary btn-ghost text-primary rounded-sm"
|
||||
@click="dialog.open('withdraw', { validator_address: item.delegation.validator_address})"
|
||||
>
|
||||
Withdraw Rewards
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -345,13 +348,9 @@ const color = computed(() => {
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-3 gap-4 px-4 pb-6 mt-4">
|
||||
<label for="send" class="btn btn-success text-white">Send</label>
|
||||
<RouterLink to="/wallet/receive" class="btn btn-info text-white"
|
||||
>Receive</RouterLink
|
||||
>
|
||||
<label for="PingTokenConvert" class="btn btn-primary text-white"
|
||||
>Convert</label
|
||||
>
|
||||
<label for="PingTokenConvert" class="btn btn-primary text-white">Convert</label>
|
||||
<label for="send" class="btn btn-success text-white" @click="dialog.open('send', {})">Send</label>
|
||||
<RouterLink to="/wallet/receive" class="btn btn-info text-white">Receive</RouterLink>
|
||||
</div>
|
||||
<Teleport to="body">
|
||||
<ping-token-convert
|
||||
|
||||
@@ -99,13 +99,11 @@ const loadAvatars = () => {
|
||||
// fetch avatar from keybase
|
||||
let promise = Promise.resolve();
|
||||
staking.validators.forEach((item) => {
|
||||
console.log(item.description)
|
||||
promise = promise.then(
|
||||
() =>
|
||||
new Promise((resolve) => {
|
||||
const identity = item.description?.identity;
|
||||
if (identity && !avatars.value[identity]) {
|
||||
console.log("loading:", identity)
|
||||
staking.keybase(identity).then((d) => {
|
||||
if (Array.isArray(d.them) && d.them.length > 0) {
|
||||
const uri = String(d.them[0]?.pictures?.primary?.url).replace(
|
||||
|
||||
@@ -11,7 +11,7 @@ const base = useBaseStore();
|
||||
const nodeInfo = ref({} as NodeInfo);
|
||||
|
||||
const height = ref(Number(base.latest.block?.header?.height|| 2001))
|
||||
const hash = ref(toHex(fromBase64(base.latest.block_id.hash)))
|
||||
const hash = ref("")
|
||||
|
||||
if(height.value > 2000) {
|
||||
height.value = Math.round((height.value - 2000) / 1000) * 1000
|
||||
|
||||
@@ -148,7 +148,7 @@ function changeTab(v: string) {
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="({v, signing}, i) in list">
|
||||
<td>{{ i+1 }}. {{ v.description.moniker }}</td>
|
||||
<td><div class="truncate max-w-sm">{{ i+1 }}. {{ v.description.moniker }}</div></td>
|
||||
<td>{{ signing?.start_height }}</td>
|
||||
<td>
|
||||
{{ signing?.index_offset }}
|
||||
|
||||
Reference in New Issue
Block a user