From d6d56ba7c0eab949b94f2f1ad2a5fb2121edcc2b Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Wed, 19 Apr 2023 12:05:19 +0800 Subject: [PATCH] improve validator and proposal --- package.json | 3 + src/components/Countdown.vue | 12 + src/components/ProposalListItem.vue | 15 +- src/components/dynamic/ArrayCoinElement.vue | 21 + src/components/dynamic/ArrayElement.vue | 3 + src/components/dynamic/DynamicComponent.vue | 2 - src/components/dynamic/TextElement.vue | 15 +- src/libs/api.ts | 20 +- src/libs/client.ts | 16 +- src/libs/registry.ts | 15 + src/modules/[chain]/gov/[proposal_id].vue | 317 ++ src/modules/[chain]/staking/[validator].vue | 44 +- src/stores/useBankStore.ts | 17 +- src/stores/useFormatter.ts | 24 + src/stores/useGovStore.ts | 9 + src/types/common.ts | 2 +- src/types/gov.ts | 6 +- src/types/ibc.ts | 4 + src/types/index.ts | 3 +- yarn-error.log | 4259 +++++-------------- yarn.lock | 21 +- 21 files changed, 1552 insertions(+), 3276 deletions(-) create mode 100644 src/components/Countdown.vue create mode 100644 src/components/dynamic/ArrayCoinElement.vue create mode 100644 src/modules/[chain]/gov/[proposal_id].vue create mode 100644 src/types/ibc.ts diff --git a/package.json b/package.json index 4445a0a4..4af1d87a 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "dependencies": { "@casl/ability": "^6.3.3", "@casl/vue": "^2.2.1", + "@chenfengyuan/vue-countdown": "2", "@cosmjs/crypto": "^0.29.5", "@cosmjs/encoding": "^0.29.5", "@floating-ui/dom": "^1.2.0", @@ -22,6 +23,7 @@ "@intlify/unplugin-vue-i18n": "^0.8.2", "@osmonauts/lcd": "^0.8.0", "@ping-pub/chain-registry-client": "^0.0.25", + "@tomieric/vue-flip-countdown": "^0.0.5", "@vitejs/plugin-vue-jsx": "^3.0.0", "@vueuse/core": "^9.12.0", "@vueuse/math": "^9.12.0", @@ -41,6 +43,7 @@ "vue-json-pretty": "^2.2.4", "vue-router": "^4.1.6", "vue3-apexcharts": "^1.4.1", + "vue3-flip-countdown": "^0.1.6", "vue3-perfect-scrollbar": "^1.6.1", "vuetify": "3.0.6", "webfontloader": "^1.6.28" diff --git a/src/components/Countdown.vue b/src/components/Countdown.vue new file mode 100644 index 00000000..b703b9eb --- /dev/null +++ b/src/components/Countdown.vue @@ -0,0 +1,12 @@ + + diff --git a/src/components/ProposalListItem.vue b/src/components/ProposalListItem.vue index da73c9de..cef0985c 100644 --- a/src/components/ProposalListItem.vue +++ b/src/components/ProposalListItem.vue @@ -1,6 +1,6 @@