From 1d045b3cd4164ba6ef2388ca9dc88b73824cbbbc Mon Sep 17 00:00:00 2001 From: "Alisa | Side.one" Date: Thu, 11 May 2023 12:26:41 +0800 Subject: [PATCH 1/7] feat: wallet --- src/modules/[chain]/index.vue | 95 ++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 29 deletions(-) diff --git a/src/modules/[chain]/index.vue b/src/modules/[chain]/index.vue index 730f1ac0..99ac8b89 100644 --- a/src/modules/[chain]/index.vue +++ b/src/modules/[chain]/index.vue @@ -13,8 +13,8 @@ import ProposalListItem from '@/components/ProposalListItem.vue'; const blockchain = useBlockchain(); const store = useIndexModule(); -const walletStore = useWalletStore() -const format = useFormatter() +const walletStore = useWalletStore(); +const format = useFormatter(); const coinInfo = computed(() => { return store.coinInfo; @@ -22,7 +22,7 @@ const coinInfo = computed(() => { onMounted(() => { store.loadDashboard(); - walletStore.loadMyAsset() + walletStore.loadMyAsset(); }); const ticker = computed(() => store.coinInfo.tickers[store.tickerIndex]); @@ -33,7 +33,7 @@ blockchain.$subscribe((m, s) => { ['chainName', 'endpoint'].includes(m.events.key) ) { store.loadDashboard(); - walletStore.loadMyAsset() + walletStore.loadMyAsset(); } }); function shortName(name: string, id: string) { @@ -68,19 +68,19 @@ const comLinks = [ // wallet box const change = computed(() => { - const token = walletStore.balanceOfStakingToken - return token? format.priceChanges(token.denom) : 0 -}) -const color= computed(() => { - switch(true) { - case change.value > 0: - return "text-green-600" + const token = walletStore.balanceOfStakingToken; + return token ? format.priceChanges(token.denom) : 0; +}); +const color = computed(() => { + switch (true) { + case change.value > 0: + return 'text-green-600'; case change.value === 0: - return "text-grey-500" + return 'text-grey-500'; case change.value < 0: - return "text-red-600" + return 'text-red-600'; } -}) +}); From 7139b76606f853cd4da986d98c777e7f26f830d8 Mon Sep 17 00:00:00 2001 From: "Alisa | Side.one" Date: Thu, 11 May 2023 17:22:15 +0800 Subject: [PATCH 2/7] feat: clear bg-base-content --- src/components/ChainSummary.vue | 2 +- src/modules/[chain]/index.vue | 8 ++++---- src/plugins/vuetify/@core/components/I18n.vue | 2 +- tailwind.config.js | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/ChainSummary.vue b/src/components/ChainSummary.vue index ff6536e5..20a9371d 100644 --- a/src/components/ChainSummary.vue +++ b/src/components/ChainSummary.vue @@ -27,7 +27,7 @@ const addFavor = (e: Event) => {