diff --git a/src/lang/locales/en.json b/src/lang/locales/en.json index 7a97d9fe..473ac179 100644 --- a/src/lang/locales/en.json +++ b/src/lang/locales/en.json @@ -47,6 +47,7 @@ "voting_time": "Voting Time", "btn_vote": "Vote", + "btn_deposit": "Deposit", "btn_detail": "Detail", "btn_back_list": "Back To List" diff --git a/src/views/Governance.vue b/src/views/Governance.vue index 2a7fea56..81d0d202 100644 --- a/src/views/Governance.vue +++ b/src/views/Governance.vue @@ -156,8 +156,17 @@ + {{ $t('btn_deposit') }} + + + @@ -182,6 +195,7 @@ import { import Ripple from 'vue-ripple-directive' import { Proposal } from '@/libs/data' import OperationVoteComponent from './OperationVoteComponent.vue' +import OperationGovDepositComponent from './OperationGovDepositComponent.vue' export default { components: { @@ -197,6 +211,7 @@ export default { BRow, BCol, OperationVoteComponent, + OperationGovDepositComponent, }, directives: { 'b-modal': VBModal, diff --git a/src/views/GovernanceProposalView.vue b/src/views/GovernanceProposalView.vue index 77f57d74..94c921cd 100644 --- a/src/views/GovernanceProposalView.vue +++ b/src/views/GovernanceProposalView.vue @@ -110,10 +110,6 @@ - @@ -228,14 +224,31 @@ + {{ $t('btn_deposit') }} + + {{ $t('btn_vote') }} + + @@ -250,6 +263,7 @@ import { getCachedValidators, getStakingValidatorByAccount, tokenFormatter } fro import { Proposal, Proposer } from '@/libs/data' import ObjectFieldComponent from './ObjectFieldComponent.vue' import OperationVoteComponent from './OperationVoteComponent.vue' +import OperationGovDepositComponent from './OperationGovDepositComponent.vue' // import { formatToken } from '@/libs/data/data' export default { @@ -270,6 +284,7 @@ export default { BBadge, ObjectFieldComponent, OperationVoteComponent, + OperationGovDepositComponent, }, data() { return { diff --git a/src/views/OperationDelegateComponent.vue b/src/views/OperationDelegateComponent.vue index 10e1fcf5..d4dd2248 100644 --- a/src/views/OperationDelegateComponent.vue +++ b/src/views/OperationDelegateComponent.vue @@ -13,242 +13,264 @@ @ok="handleOk" @show="loadBalance" > - - - - - - - - - {{ errors[0] }} - - - - - - + + + + + + No available account found. + + + Connect Wallet + + + + + + + - - {{ errors[0] }} - - - - - - - - - - - {{ format(x) }} - - + + {{ errors[0] }} - - - - - - - + + + + - + + + {{ errors[0] }} + + + + + + + + + + + {{ format(x) }} + + + {{ errors[0] }} + + + + + + + + + + + + {{ printDenom() }} + + + {{ errors[0] }} + + + + + + + + + + + + + + + {{ errors[0] }} + + + + + + + Advance + + + + + + + + + - - {{ printDenom() }} - - - {{ errors[0] }} - - - - - - - - {{ errors[0] }} + + + + + - - - - - - - {{ errors[0] }} - - - - - - - Advance - - - - - - - - - - {{ errors[0] }} - - - - - - - - {{ errors[0] }} - - - - - - - - - - - + {{ errors[0] }} + + + + + + + + + + - Keplr - - - Ledger(USB) - - - Ledger(Bluetooth) - - - {{ errors[0] }} - - - - - - - Connect Wallet - - - {{ error }} - + + Keplr + + + Ledger(USB) + + + Ledger(Bluetooth) + + + {{ errors[0] }} + + + + + + + {{ error }} + @@ -256,7 +278,7 @@ import { ValidationProvider, ValidationObserver } from 'vee-validate' import { BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormSelectOption, - BForm, BFormRadioGroup, BFormRadio, BButton, BInputGroupAppend, BFormCheckbox, + BForm, BFormRadioGroup, BFormRadio, BButton, BInputGroupAppend, BFormCheckbox, BOverlay, } from 'bootstrap-vue' import { required, email, url, between, alpha, integer, password, min, digits, alphaDash, length, @@ -285,6 +307,7 @@ export default { vSelect, BButton, BInputGroupAppend, + BOverlay, ValidationProvider, ValidationObserver, @@ -396,7 +419,7 @@ export default { }, computeAccount() { const accounts = getLocalAccounts() - const values = Object.values(accounts) + const values = accounts ? Object.values(accounts) : [] let array = [] for (let i = 0; i < values.length; i += 1) { const addrs = values[i].address.filter(x => x.chain === this.$route.params.chain) diff --git a/src/views/OperationGovDepositComponent.vue b/src/views/OperationGovDepositComponent.vue new file mode 100644 index 00000000..212400b5 --- /dev/null +++ b/src/views/OperationGovDepositComponent.vue @@ -0,0 +1,488 @@ + + + + + + + No available account found. + + + Connect Wallet + + + + + + + + {{ proposalId }}. {{ title }} + + + + + + + + {{ errors[0] }} + + + + + + + + + + + {{ format(item) }} + + + {{ errors[0] }} + + + + + + + + + + + + {{ printDenom() }} + + + {{ errors[0] }} + + + + + + + + + + + + + + + {{ errors[0] }} + + + + + + + Advance + + + + + + + + + + {{ errors[0] }} + + + + + + + + {{ errors[0] }} + + + + + + + + + + + + Keplr + + + Ledger(USB) + + + Ledger(Bluetooth) + + + {{ errors[0] }} + + + + + + + {{ error }} + + + + + + + diff --git a/src/views/OperationTransfer2Component.vue b/src/views/OperationTransfer2Component.vue index b01d1f36..319fa71e 100644 --- a/src/views/OperationTransfer2Component.vue +++ b/src/views/OperationTransfer2Component.vue @@ -12,11 +12,21 @@ @hidden="resetModal" @ok="handleOk" @show="loadBalance" + > + + + + IBC Module is not enabled. + + + - + @@ -272,7 +282,7 @@ {{ error }} - + @@ -280,7 +290,7 @@ import { ValidationProvider, ValidationObserver } from 'vee-validate' import { BModal, BRow, BCol, BInputGroup, BInputGroupAppend, BFormInput, BAvatar, BFormGroup, BFormSelect, BFormSelectOption, - BForm, BFormRadioGroup, BFormRadio, BInputGroupPrepend, BFormCheckbox, + BForm, BFormRadioGroup, BFormRadio, BInputGroupPrepend, BFormCheckbox, BOverlay, } from 'bootstrap-vue' import { required, email, url, between, alpha, integer, password, min, digits, alphaDash, length, @@ -312,6 +322,7 @@ export default { BFormRadio, BFormCheckbox, vSelect, + BOverlay, ValidationProvider, ValidationObserver, @@ -388,12 +399,14 @@ export default { computeAccount() { const accounts = getLocalAccounts() const chains = getLocalChains() - const values = Object.values(accounts) - for (let i = 0; i < values.length; i += 1) { - const addr = values[i].address.find(x => x.addr === this.address) - if (addr) { - this.selectedChain = chains[addr.chain] - return addr + if (accounts) { + const values = Object.values(accounts) + for (let i = 0; i < values.length; i += 1) { + const addr = values[i].address.find(x => x.addr === this.address) + if (addr) { + this.selectedChain = chains[addr.chain] + return addr + } } } return null diff --git a/src/views/OperationTransferComponent.vue b/src/views/OperationTransferComponent.vue index 86b50955..dbf7de10 100644 --- a/src/views/OperationTransferComponent.vue +++ b/src/views/OperationTransferComponent.vue @@ -16,22 +16,23 @@ - + @@ -338,12 +339,14 @@ export default { computeAccount() { const accounts = getLocalAccounts() const chains = getLocalChains() - const values = Object.values(accounts) - for (let i = 0; i < values.length; i += 1) { - const addr = values[i].address.find(x => x.addr === this.address) - if (addr) { - this.selectedChain = chains[addr.chain] - return addr + if (accounts) { + const values = Object.values(accounts) + for (let i = 0; i < values.length; i += 1) { + const addr = values[i].address.find(x => x.addr === this.address) + if (addr) { + this.selectedChain = chains[addr.chain] + return addr + } } } return null @@ -351,6 +354,7 @@ export default { loadBalance() { this.account = this.computeAccount() if (this.account && this.account.length > 0) this.address = this.account[0].addr + console.log(this.account, this.address) if (this.address) { this.$http.getBankBalances(this.address, this.selectedChain).then(res => { if (res && res.length > 0) { diff --git a/src/views/OperationVoteComponent.vue b/src/views/OperationVoteComponent.vue index 4bc3a457..9e543b65 100644 --- a/src/views/OperationVoteComponent.vue +++ b/src/views/OperationVoteComponent.vue @@ -12,7 +12,23 @@ @hidden="resetModal" @ok="handleOk" @show="loadBalance" + > + + + + No available account found. + + + Connect Wallet + + + @@ -212,7 +228,7 @@ {{ error }} - + @@ -220,7 +236,7 @@ import { ValidationProvider, ValidationObserver } from 'vee-validate' import { BModal, BRow, BCol, BInputGroup, BFormInput, BFormGroup, BFormSelect, BFormCheckbox, - BForm, BFormRadioGroup, BFormRadio, BInputGroupAppend, + BForm, BFormRadioGroup, BFormRadio, BInputGroupAppend, BOverlay, BButton, } from 'bootstrap-vue' import { required, email, url, between, alpha, integer, password, min, digits, alphaDash, length, @@ -246,6 +262,8 @@ export default { BFormRadio, BFormCheckbox, BInputGroupAppend, + BOverlay, + BButton, ValidationProvider, ValidationObserver, @@ -300,13 +318,15 @@ export default { }, methods: { computeAccount() { - const accounts = getLocalAccounts() - const values = Object.values(accounts) let array = [] - for (let i = 0; i < values.length; i += 1) { - const addrs = values[i].address.filter(x => x.chain === this.$route.params.chain) - if (addrs && addrs.length > 0) { - array = array.concat(addrs.map(x => ({ value: x.addr, label: values[i].name.concat(' - ', abbrAddress(x.addr)) }))) + const accounts = getLocalAccounts() + if (accounts) { + const values = Object.values(accounts) + for (let i = 0; i < values.length; i += 1) { + const addrs = values[i].address.filter(x => x.chain === this.$route.params.chain) + if (addrs && addrs.length > 0) { + array = array.concat(addrs.map(x => ({ value: x.addr, label: values[i].name.concat(' - ', abbrAddress(x.addr)) }))) + } } } return array diff --git a/src/views/OperationWithdrawComponent.vue b/src/views/OperationWithdrawComponent.vue index 80757ed1..25ba45ce 100644 --- a/src/views/OperationWithdrawComponent.vue +++ b/src/views/OperationWithdrawComponent.vue @@ -16,7 +16,7 @@ - + @@ -251,12 +251,14 @@ export default { computeAccount() { const accounts = getLocalAccounts() const chains = getLocalChains() - const values = Object.values(accounts) - for (let i = 0; i < values.length; i += 1) { - const addr = values[i].address.find(x => x.addr === this.address) - if (addr) { - this.selectedChain = chains[addr.chain] - return addr + if (accounts) { + const values = Object.values(accounts) + for (let i = 0; i < values.length; i += 1) { + const addr = values[i].address.find(x => x.addr === this.address) + if (addr) { + this.selectedChain = chains[addr.chain] + return addr + } } } return null diff --git a/src/views/Staking.vue b/src/views/Staking.vue index 7ee6a7d3..7a5ec7c1 100644 --- a/src/views/Staking.vue +++ b/src/views/Staking.vue @@ -93,15 +93,27 @@ class="text-danger" >{{ data.item.changes }} + + + Delegate + + +
+ No available account found. +
+ IBC Module is not enabled. +