change Layout of first panel
This commit is contained in:
parent
794d3733a0
commit
5620337d3a
@ -61,10 +61,10 @@ export default {
|
||||
title: '',
|
||||
class: 'border-primary',
|
||||
items: [
|
||||
{ subtitle: 'chain_id', icon: 'LinkIcon', color: 'light-primary' },
|
||||
{ subtitle: 'height', icon: 'BoxIcon', color: 'light-success' },
|
||||
{ subtitle: 'bonded_and_supply', icon: 'DollarSignIcon', color: 'light-danger' },
|
||||
{ subtitle: 'bonded_ratio', icon: 'PercentIcon', color: 'light-warning' },
|
||||
{ subtitle: 'inflation', icon: 'TrendingUpIcon', color: 'light-primary' },
|
||||
],
|
||||
},
|
||||
staking: {
|
||||
@ -91,13 +91,17 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.$http.getLatestBlock().then(res => {
|
||||
const chainIndex = this.chain.items.findIndex(x => x.subtitle === 'chain_id')
|
||||
const height = this.chain.items.findIndex(x => x.subtitle === 'height')
|
||||
|
||||
this.$set(this.chain.items[chainIndex], 'title', res.block.header.chain_id)
|
||||
this.$set(this.chain, 'title', `Chain ID: ${res.block.header.chain_id}`)
|
||||
this.$set(this.chain.items[height], 'title', res.block.header.height)
|
||||
})
|
||||
|
||||
this.$http.getMintingInflation().then(res => {
|
||||
const chainIndex = this.chain.items.findIndex(x => x.subtitle === 'inflation')
|
||||
this.$set(this.chain.items[chainIndex], 'title', `${percent(res)}%`)
|
||||
})
|
||||
|
||||
this.$http.getStakingParameters().then(res => {
|
||||
this.staking = this.normalize(res, 'Staking Parameters')
|
||||
Promise.all([this.$http.getStakingPool(), this.$http.getBankTotal(res.bond_denom)])
|
||||
|
Loading…
Reference in New Issue
Block a user