UX improvement
This commit is contained in:
parent
411d1a829e
commit
2f240f34bf
@ -16,16 +16,16 @@ wasmStore.wasmClient.getWasmCodeList().then(x =>{
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VCard>
|
<VCard>
|
||||||
<VCardTitle>Cosmos Wasm</VCardTitle>
|
<VCardTitle>Cosmos Wasm Smart Contracts</VCardTitle>
|
||||||
<VTable>
|
<VTable>
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>Code Id</th><th>Creator</th><th>Code Hash</th><th>Permissions</th></tr>
|
<tr><th>Code Id</th><th>Code Hash</th><th>Creator</th><th>Permissions</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="v in codes.code_infos">
|
<tr v-for="v in codes.code_infos">
|
||||||
<td>{{ v.code_id }}</td>
|
<td>{{ v.code_id }}</td>
|
||||||
<td>{{ v.creator }}</td>
|
|
||||||
<td><RouterLink :to="`/${props.chain}/cosmwasm/${v.code_id}/contracts`"><div class="text-truncate" style="max-width: 200px;">{{ v.data_hash }}</div></RouterLink></td>
|
<td><RouterLink :to="`/${props.chain}/cosmwasm/${v.code_id}/contracts`"><div class="text-truncate" style="max-width: 200px;">{{ v.data_hash }}</div></RouterLink></td>
|
||||||
|
<td>{{ v.creator }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ v.instantiate_permission?.permission }}
|
{{ v.instantiate_permission?.permission }}
|
||||||
<span>{{ v.instantiate_permission?.address }} {{ v.instantiate_permission.addresses.join(", ") }}</span>
|
<span>{{ v.instantiate_permission?.address }} {{ v.instantiate_permission.addresses.join(", ") }}</span>
|
||||||
|
@ -6,7 +6,12 @@ const tab = ref('');
|
|||||||
const store = useGovStore();
|
const store = useGovStore();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
store.fetchProposals('2');
|
store.fetchProposals('2').then(x => {
|
||||||
|
if(x.proposals.length ===0 ) {
|
||||||
|
tab.value = "3"
|
||||||
|
store.fetchProposals('3')
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -41,14 +41,12 @@ onMounted(() => {
|
|||||||
for (let i = height - 1; i > height - 50; i -= 1) {
|
for (let i = height - 1; i > height - 50; i -= 1) {
|
||||||
if (i > height - 48) {
|
if (i > height - 48) {
|
||||||
promise = promise.then(() => new Promise((resolve, reject) => {
|
promise = promise.then(() => new Promise((resolve, reject) => {
|
||||||
|
if(live.value) { // continue only if the page is living
|
||||||
baseStore.fetchBlock(i).then((x) => {
|
baseStore.fetchBlock(i).then((x) => {
|
||||||
commits.value.unshift(x.block.last_commit)
|
commits.value.unshift(x.block.last_commit)
|
||||||
if(live.value) {
|
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
|
||||||
reject()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user