diff --git a/src/@core/components/app-collapse/AppCollapseItem.vue b/src/@core/components/app-collapse/AppCollapseItem.vue index bfc2cfa7..191ef613 100644 --- a/src/@core/components/app-collapse/AppCollapseItem.vue +++ b/src/@core/components/app-collapse/AppCollapseItem.vue @@ -12,6 +12,7 @@ :aria-controls="collapseItemID" role="tab" data-toggle="collapse" + class="px-0 mx-0" @click="updateVisible(!visible)" > @@ -25,7 +26,7 @@ :accordion="accordion" role="tabpanel" > - + diff --git a/src/views/ArrayFieldComponent.vue b/src/views/ArrayFieldComponent.vue index 09dc3591..a2fb3cca 100644 --- a/src/views/ArrayFieldComponent.vue +++ b/src/views/ArrayFieldComponent.vue @@ -26,7 +26,7 @@ import { BTable } from 'bootstrap-vue' import { - getStakingValidatorByHex, isHexAddress, isToken, toDay, tokenFormatter, + getStakingValidatorByHex, isHexAddress, isToken, percent, toDay, tokenFormatter, } from '@/libs/data/data' export default { @@ -56,9 +56,13 @@ export default { }, formatText(value) { const reg = /^\d{4}.\d{1,2}.\d{1,2}T\d{2}:\d{2}:.+Z$/ + const percentage = /^0\.\d+/ if (reg.test(value)) { return toDay(value) } + if (percentage.test(value)) { + return `${percent(value)}%` + } if (value.length > 40) { return value.substring(0, 40).concat('...') } diff --git a/src/views/ChartjsComponentBar.vue b/src/views/ChartjsComponentBar.vue index 0fb3cd1d..21df6c09 100644 --- a/src/views/ChartjsComponentBar.vue +++ b/src/views/ChartjsComponentBar.vue @@ -5,23 +5,23 @@ export default { extends: Bar, mixins: [mixins.reactiveProp], props: { - // options: { - // type: Object, - // default: null, - // }, + options: { + type: Object, + default: null, + }, }, data() { return { - options: { - plugins: { - legend: { - display: false, - labels: { - color: 'rgb(255, 99, 132)', - }, - }, - }, - }, + // options: { + // plugins: { + // legend: { + // display: false, + // labels: { + // color: 'rgb(255, 99, 132)', + // }, + // }, + // }, + // }, } }, mounted() { diff --git a/src/views/ObjectFieldComponent.vue b/src/views/ObjectFieldComponent.vue index 0a5bc84d..add9a6ee 100644 --- a/src/views/ObjectFieldComponent.vue +++ b/src/views/ObjectFieldComponent.vue @@ -51,7 +51,7 @@ v-else-if="typeof value[key] === 'object'" :tablefield="value[key]" /> - {{ formatText(value[key]) }} + {{ formatText(value[key]) }} @@ -68,7 +68,7 @@ import { BTableSimple, BTr, BTd, BTabs, BTab, BTbody, } from 'bootstrap-vue' import { - abbr, getStakingValidatorByHex, isHexAddress, isStringArray, isToken, tokenFormatter, + abbr, getStakingValidatorByHex, isHexAddress, isStringArray, isToken, percent, tokenFormatter, } from '@/libs/data' import ArrayFieldComponent from './ArrayFieldComponent.vue' @@ -122,9 +122,14 @@ export default { return tokenFormatter(value) }, addNewLine(value) { + const percentage = /^0\.\d+/ + if (percentage.test(value)) { + return `${percent(value)}%` + } if (typeof value === 'string' && value.indexOf('\\n') > -1) { return value.replaceAll('\\n', '\n') } + return value }, }, diff --git a/src/views/WalletAccountDetail.vue b/src/views/WalletAccountDetail.vue index c9845cef..57115c28 100644 --- a/src/views/WalletAccountDetail.vue +++ b/src/views/WalletAccountDetail.vue @@ -456,7 +456,7 @@ export default { total = total.concat(this.assets.map(x => { const xh = x xh.type = 'Balance' - xh.color = 'primary' + xh.color = 'success' xh.icon = 'CreditCardIcon' xh.currency = this.formatCurrency(xh.amount, xh.denom) sumCurrency += xh.currency @@ -477,7 +477,7 @@ export default { }) total.push({ type: 'Delegation', - color: 'success', + color: 'primary', icon: 'LockIcon', amount: temp, denom: stakingDenom, @@ -551,7 +551,7 @@ export default { { labels: Object.keys(data), data: Object.values(data), - backgroundColor: [$themeColors.primary, $themeColors.success, $themeColors.warning, $themeColors.danger, $themeColors.info], + backgroundColor: [$themeColors.success, $themeColors.primary, $themeColors.warning, $themeColors.danger, $themeColors.info], borderWidth: 0, pointStyle: 'rectRounded', }, diff --git a/src/views/WalletAccounts.vue b/src/views/WalletAccounts.vue index 3d161939..4e8c5933 100644 --- a/src/views/WalletAccounts.vue +++ b/src/views/WalletAccounts.vue @@ -4,7 +4,7 @@ v-if="calculateTotal > 0" border-variant="primary" > - + @@ -54,6 +54,8 @@ @@ -141,26 +143,28 @@ />

{{ currency }}{{ formatBalance(acc.addr) }}

- - {{ formatAddr(acc.addr) }} - - -
- - - - + + +
+ + + {{ formatDenom(b.denom) }}
@@ -168,8 +172,32 @@ {{ currency }}{{ formatCurrency(b.amount, b.denom) }}
-
-
+
+
+ + + + {{ formatDenom(b.denom) }} +
+
+ {{ formatAmount(b.amount) }} + {{ currency }}{{ formatCurrency(b.amount, b.denom) }} +
+
+ +
@@ -193,6 +221,7 @@