feat: add node Info and application version

This commit is contained in:
alisa
2023-04-27 15:34:39 +08:00
parent 248f4411e3
commit 987f76b7d4
7 changed files with 58 additions and 19 deletions
-2
View File
@@ -25,9 +25,7 @@ const format = useFormatter();
const ticker = computed(() => store.coinInfo.tickers[store.tickerIndex]);
blockchain.$subscribe((m, s) => {
console.log('index:', m);
if (!Array.isArray(m.events) && ['chainName', 'endpoint'].includes(m.events.key)) {
console.log(m.events.key);
store.loadDashboard();
}
});
-1
View File
@@ -176,7 +176,6 @@ export const useIndexModule = defineStore('module-index', {
},
actions: {
async loadDashboard() {
console.log('initial dashboard')
this.$reset()
this.initCoingecko()
useMintStore().fetchInflation()
+5 -4
View File
@@ -2,6 +2,8 @@
import { useParamStore } from '@/stores';
import { ref, onMounted } from 'vue'
import CardParameter from '@/components/CardParameter.vue'
import TableParameter from '@/components/TableParameter.vue'
import { sort } from 'semver';
const store = useParamStore()
const chain = ref(store.chain)
onMounted(() => {
@@ -22,13 +24,10 @@ onMounted(() => {
</div>
</div>
</div>
<!-- minting Parameters -->
<CardParameter :cardItem="store.mint"/>
<CardParameter :cardItem="store.mint"/>
<!-- Staking Parameters -->
<CardParameter :cardItem="store.staking"/>
<!-- Governance Parameters -->
<CardParameter :cardItem="store.gov"/>
<!-- Distribution Parameters -->
@@ -36,7 +35,9 @@ onMounted(() => {
<!-- Slashing Parameters -->
<CardParameter :cardItem="store.slashing"/>
<!-- Application Version -->
<TableParameter :tableItem="store.appVersion"/>
<!-- Node Information -->
<TableParameter :tableItem="store.nodeVersion"/>
</div>
</template>