diff --git a/src/modules/[chain]/index.vue b/src/modules/[chain]/index.vue
index 4e5542a5..b75a32ec 100644
--- a/src/modules/[chain]/index.vue
+++ b/src/modules/[chain]/index.vue
@@ -1,6 +1,6 @@
@@ -44,58 +43,75 @@ function shortName(name: string, id: string) {
- {{ coinInfo.name }} ({{ coinInfo.symbol }})
+ {{ coinInfo.name }} (
+ {{ coinInfo.symbol }}
+ )
- Rank: #{{ coinInfo.market_cap_rank }}
+ Rank:
+ #{{ coinInfo.market_cap_rank }}
-
-
- Website
- Twitter
- Telegram
- Github
+
+
+
+ Website
+
+
+ Twitter
+
+
+ Telegram
+
+
+ Github
+
-
- {{ store.priceChange }}%
+
+ {{ store.priceChange }}
+ %
-
+
- {{ ticker?.market?.name || ''}}
+ {{ ticker?.market?.name || '' }}
- {{ shortName(ticker?.base, ticker.coin_id) }}/{{ shortName(ticker?.target, ticker.target_coin_id) }}
+
+ {{ shortName(ticker?.base, ticker.coin_id) }}/{{
+ shortName(ticker?.target, ticker.target_coin_id)
+ }}
+
-
+
-
-
+
- {{ shortName(item?.base, item.coin_id) }}/{{ shortName(item?.target, item.target_coin_id) }}
+
+ {{ shortName(item?.base, item.coin_id) }}/{{
+ shortName(item?.target, item.target_coin_id)
+ }}
+
- {{ item.converted_last.usd }}
+
+ {{ item.converted_last.usd }}
+
-
@@ -107,14 +123,9 @@ function shortName(name: string, id: string) {
-
- Buy {{ coinInfo.symbol || '' }}
-
+
+ Buy {{ coinInfo.symbol || '' }}
+
@@ -124,33 +135,31 @@ function shortName(name: string, id: string) {
-
+
+
+
{{ tag }}
-
-
-
-
-
-
-
+
-
- Active Proposals
-
-
-
-
- No active proposals
+
+ Active Proposals
+
+
+
+
+ No active proposals
-
- Connect Wallet
-
+ Connect Wallet
diff --git a/src/plugins/i18n/locales/en.json b/src/plugins/i18n/locales/en.json
index 0b33c531..953f4229 100644
--- a/src/plugins/i18n/locales/en.json
+++ b/src/plugins/i18n/locales/en.json
@@ -11,7 +11,7 @@
"add_to_favorite": "Add to favorite"
},
"Ecosystem": "Ecosystem",
- "All Blockchains": "All Blockchain222",
+ "All Blockchains": "All Blockchain",
"Favorite": "Favorite"
}
diff --git a/src/stores/useFormatter.ts b/src/stores/useFormatter.ts
index 3c9dc00f..07f8ea59 100644
--- a/src/stores/useFormatter.ts
+++ b/src/stores/useFormatter.ts
@@ -127,7 +127,6 @@ export const useFormatter = defineStore('formatter', {
calculatePercent(input?: string|number, total?: string|number ) {
if(!input || !total) return '0'
const percent = Number(input)/Number(total)
- console.log(input, total, percent);
return numeral(percent>0.0001?percent: 0).format("0.[00]%")
},
formatDecimalToPercent(decimal: string) {
diff --git a/src/stores/useGovStore.ts b/src/stores/useGovStore.ts
index 3871febb..75b91a09 100644
--- a/src/stores/useGovStore.ts
+++ b/src/stores/useGovStore.ts
@@ -2,6 +2,7 @@ import { defineStore } from "pinia";
import { useBlockchain } from "./useBlockchain";
import type { PageRequest, PaginatedProposals } from "@/types";
import { LoadingStatus } from "./useDashboard";
+import {reactive} from 'vue'
export const useGovStore = defineStore('govStore', {
state: () => {
@@ -27,18 +28,16 @@ export const useGovStore = defineStore('govStore', {
async fetchProposals( status: string, pagination?: PageRequest ) {
if(!this.loading[status]) {
this.loading[status] = LoadingStatus.Loading
- const proposals = await this.blockchain.rpc.getGovProposals(status)
+ const proposals = reactive(await this.blockchain.rpc.getGovProposals(status))
+ if(status === '2') {
+ proposals.proposals.forEach(async(x1) => {
+ await this.fetchTally(x1.proposal_id).then(res => {
+ x1.final_tally_result = res?.tally
+ })
+ })
+ }
this.loading[status] = LoadingStatus.Loaded
this.proposals[status] = proposals
-
- if(status === '2') {
- proposals.proposals.forEach(x1 => {
- this.fetchTally(x1.proposal_id).then(t => {
- x1.final_tally_result = t.tally
- this.proposals[status] = proposals
- })
- })
- }
}
return this.proposals[status]
},
@@ -48,7 +47,7 @@ export const useGovStore = defineStore('govStore', {
// })
},
async fetchTally(proposalId: string) {
- return this.blockchain.rpc.getGovProposalTally(proposalId)
+ return await this.blockchain.rpc.getGovProposalTally(proposalId)
},
async fetchProposal(proposalId: string) {
return this.blockchain.rpc.getGovProposal(proposalId)
@@ -59,5 +58,6 @@ export const useGovStore = defineStore('govStore', {
async fetchProposalVotes(proposalId: string, next_key?: string) {
return this.blockchain.rpc.getGovProposalVotes(proposalId, next_key)
}
- }
+ },
+
})
diff --git a/src/style.css b/src/style.css
index b5c61c95..2c25f20c 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1,3 +1,21 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+
+@layer base {
+ :root {
+ --text-main: #333;
+ --text-secondary: #4b525d;
+ --bg-card: #fff;
+ --bg-active: #fbfbfc;
+ --bg-hover: #eee;
+ }
+
+ html.dark {
+ --text-main: #f7f7f7;
+ --text-secondary: #6f6e84;
+ --bg-card: #28334e;
+ --bg-active: #242b40;
+ --bg-hover: #303044;
+ }
+}
diff --git a/src/types/gov.ts b/src/types/gov.ts
index 1a53e62b..7f9b4d53 100644
--- a/src/types/gov.ts
+++ b/src/types/gov.ts
@@ -27,6 +27,10 @@ export interface GovProposal {
"@type": string,
"title": string,
"description": string,
+ "plan"?: {
+ 'height'?: string | number,
+ 'time'?: string | number,
+ }
},
"status": string,
"final_tally_result": {
diff --git a/tailwind.config.js b/tailwind.config.js
index e50eb1c7..bbade89b 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -5,12 +5,15 @@ module.exports = {
theme: {
extend: {
colors: {
- main: '#5973fe',
yes: '#3fb68b',
no: '#ff5353',
info: '#00b2ff',
- textMain: '#333',
primary: '#666cff',
+ main: 'var(--text-main)',
+ secondary: 'var(--text-secondary)',
+ card: 'var(--bg-card)',
+ hover: 'var(--bg-hover)',
+ active: 'var(--bg-active)',
},
},
},