diff --git a/src/layouts/components/Navbar.vue b/src/layouts/components/Navbar.vue
index 7125a20d..5304738c 100644
--- a/src/layouts/components/Navbar.vue
+++ b/src/layouts/components/Navbar.vue
@@ -44,7 +44,7 @@
size="42"
:src="selected_chain.logo"
class="badge-minimal"
- :badge-variant="chainVariant"
+ :badge-variant="variant"
/>
@@ -166,22 +166,31 @@ export default {
},
data() {
return {
- chainVariant: 'success',
+ variant: 'success',
tips: 'Synced',
}
},
computed: {
selected_chain() {
+ this.block()
return store.state.chains.selected
},
+ chainVariant() {
+ return this.variant
+ },
},
- created() {
- this.$http.getLatestBlock().then(block => {
- if (timeIn(block.block.header.time, 1, 'm')) {
- this.chainVariant = 'danger'
- this.tips = `Halted ${toDay(block.block.header.time, 'from')} `
- }
- })
+ methods: {
+ block() {
+ store.commit('setHeight', 0)
+ this.$http.getLatestBlock().then(block => {
+ store.commit('setHeight', Number(block.block.header.height))
+ this.tips = `Synced height:${block.block.header.height}`
+ if (timeIn(block.block.header.time, 1, 'm')) {
+ this.variant = 'danger'
+ this.tips = `Halted ${toDay(block.block.header.time, 'from')}, Height: ${store.state.chains.height} `
+ }
+ })
+ },
},
}
diff --git a/src/libs/fetch.js b/src/libs/fetch.js
index e74192a7..7db5292f 100644
--- a/src/libs/fetch.js
+++ b/src/libs/fetch.js
@@ -112,6 +112,10 @@ const chainAPI = class ChainFetch {
})
}
+ async getValidatorListByHeight(height) {
+ return this.get(`/validatorsets/${height}`).then(data => commonProcess(data))
+ }
+
async getStakingValidator(address) {
return this.get(`/staking/validators/${address}`).then(data => new Validator().init(commonProcess(data)))
}
diff --git a/src/store/chains/index.js b/src/store/chains/index.js
index fc438183..e43cbddc 100644
--- a/src/store/chains/index.js
+++ b/src/store/chains/index.js
@@ -46,6 +46,7 @@ export default {
config: chains,
selected,
avatars: {},
+ height: 0,
},
getters: {
getchains: state => state.chains,
@@ -61,7 +62,9 @@ export default {
cacheAvatar(state, args) {
state.chains.avatars[args.identity] = args.url
},
-
+ setHeight(state, height) {
+ state.chains.height = height
+ },
},
actions: {},
}
diff --git a/src/views/ArrayFieldComponent.vue b/src/views/ArrayFieldComponent.vue
index d2266a39..12581a38 100644
--- a/src/views/ArrayFieldComponent.vue
+++ b/src/views/ArrayFieldComponent.vue
@@ -4,7 +4,7 @@
:items="tablefield"
:sticky-header="true"
:no-border-collapse="true"
- responsive
+ responsive="sm"
class="ml-0 mr-0"
>
@@ -24,13 +24,10 @@
-
-
diff --git a/src/views/GovernanceProposalView.vue b/src/views/GovernanceProposalView.vue
index 75f3a6e9..295e9cc9 100644
--- a/src/views/GovernanceProposalView.vue
+++ b/src/views/GovernanceProposalView.vue
@@ -372,5 +372,7 @@ export default {
.addzone :hover {
border: 2px dashed #7367F0;
}
-
+@media (min-width: 768px) {
+ td:first-child { width: 20% ;}
+}
diff --git a/src/views/ObjectFieldComponent.vue b/src/views/ObjectFieldComponent.vue
index ff6d3967..1b3e9d72 100644
--- a/src/views/ObjectFieldComponent.vue
+++ b/src/views/ObjectFieldComponent.vue
@@ -131,7 +131,7 @@ export default {
}
-