From 6bfc131c6b66e476fd135a70bd541729628fa53e Mon Sep 17 00:00:00 2001 From: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> Date: Fri, 20 Jan 2023 14:46:05 +0300 Subject: [PATCH 01/52] Liiquidity proxy 1.6 (#923) * update wallet with liqudity proxy * update swap view --- package.json | 2 +- src/store/swap/actions.ts | 5 ++- src/views/Swap.vue | 12 ++----- yarn.lock | 72 +++++++++++++++++++-------------------- 4 files changed, 43 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index ab75f541a..50b1174f3 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "dependencies": { "@metamask/detect-provider": "^2.0.0", - "@soramitsu/soraneo-wallet-web": "1.13.1", + "@soramitsu/soraneo-wallet-web": "1.13.3", "@walletconnect/web3-provider": "^1.8.0", "base-64": "^1.0.0", "core-js": "^3.26.0", diff --git a/src/store/swap/actions.ts b/src/store/swap/actions.ts index 8ef3482a6..e8ee781cd 100644 --- a/src/store/swap/actions.ts +++ b/src/store/swap/actions.ts @@ -61,10 +61,13 @@ const actions = defineActions({ async switchTokens(context): Promise { const { commit, state } = swapActionContext(context); - const { tokenFromAddress: from, tokenToAddress: to } = state; + const { tokenFromAddress: from, tokenToAddress: to, fromValue, toValue, isExchangeB } = state; if (from && to) { commit.setTokenFromAddress(to); commit.setTokenToAddress(from); + commit.setFromValue(toValue); + commit.setToValue(fromValue); + commit.setExchangeB(!isExchangeB); updateTokenSubscription(context, Direction.From); updateTokenSubscription(context, Direction.To); } diff --git a/src/views/Swap.vue b/src/views/Swap.vue index 45b5c76fa..0bb706ed3 100644 --- a/src/views/Swap.vue +++ b/src/views/Swap.vue @@ -477,7 +477,7 @@ export default class Swap extends Mixins( this.setAmountWithoutImpact(amountWithoutImpact as string); this.setLiquidityProviderFee(fee); this.setRewards(rewards); - this.setPath(path); + this.setPath(path as string[]); this.selectDexId(bestDexId); } catch (error: any) { console.error(error); @@ -538,18 +538,10 @@ export default class Swap extends Mixins( } async handleSwitchTokens(): Promise { - if (!(this.tokenFrom && this.tokenTo)) return; + if (!this.areTokensSelected) return; await this.switchTokens(); - if (this.isExchangeB) { - this.setExchangeB(false); - this.handleInputFieldFrom(this.toValue); - } else { - this.setExchangeB(true); - this.handleInputFieldTo(this.fromValue); - } - this.subscribeOnSwapReserves(); } diff --git a/yarn.lock b/yarn.lock index 66ce852ac..9732727bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2521,60 +2521,60 @@ resolved "https://registry.yarnpkg.com/@soda/get-current-script/-/get-current-script-1.0.2.tgz#a53515db25d8038374381b73af20bb4f2e508d87" integrity sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w== -"@sora-substrate/api@1.13.4": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@sora-substrate/api/-/api-1.13.4.tgz#91006cc68c7657e08621e2846be921cb8a88aaaf" - integrity sha512-AGUpROkbpc5Ns4RlUTViJl63fRJMcJmFQ+BBkp/4BYcHQn2STnv78z3MET+uOb7JciGThCL7Vt+0HCdtPCSniQ== +"@sora-substrate/api@1.13.8": + version "1.13.8" + resolved "https://registry.yarnpkg.com/@sora-substrate/api/-/api-1.13.8.tgz#842dc5d8287c3119722e213a514b4bfaf422ea6f" + integrity sha512-rhWISPHvUB6HCdO5MKyxf+xTqA892G//DIVn3i8+T+ucTUHnfw7kise1pv6hhJbDJbg/8TO7fTRy1NtO/KvuAA== dependencies: "@open-web3/orml-api-derive" "0.9.4-26" "@polkadot/api" "9.6.2" - "@sora-substrate/types" "1.13.4" + "@sora-substrate/types" "1.13.8" -"@sora-substrate/liquidity-proxy@1.13.4": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@sora-substrate/liquidity-proxy/-/liquidity-proxy-1.13.4.tgz#f210627a33b2e5468dc93e1b9d1e25d78b7eee22" - integrity sha512-XVEZxiwv2BVdKFI9SRvzQEmANsaP3mjhkUcZp4Is/ItqzocDtDzSjSzBssbvVyK0/yyNXLQwRAxG3o1X30Spdw== +"@sora-substrate/liquidity-proxy@1.13.8": + version "1.13.8" + resolved "https://registry.yarnpkg.com/@sora-substrate/liquidity-proxy/-/liquidity-proxy-1.13.8.tgz#a0110c4bcf8b7548a1382fa1ec12cce38ba569e6" + integrity sha512-zPQukF73O+SPORRmopm87+DHAGBNQxACen9KqtmV9bFBYosOnjpUTNmKlCxpD+6qMt10djNrw4/Qb/iq81unNg== dependencies: - "@sora-substrate/math" "1.13.4" + "@sora-substrate/math" "1.13.8" -"@sora-substrate/math@1.13.4": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@sora-substrate/math/-/math-1.13.4.tgz#8b2ed2f76a62dfe46d8e1e09fa87f154a770d0cd" - integrity sha512-Uf8eNUe4QDPDojtS0xEz3mVWVhFeNVTJsaZlenwL/iEyknUKZB1eid1JRaZaeRLl0h6RsEmllN7JC3g8zMRm6A== +"@sora-substrate/math@1.13.8": + version "1.13.8" + resolved "https://registry.yarnpkg.com/@sora-substrate/math/-/math-1.13.8.tgz#5bf8a9078212ef44f486fa2716ee84a87af9522e" + integrity sha512-ZZ5nsYqqmEZSCySXYSGhoRbExZ8z+eZlBiXL7gUiW9BRIuPJ5stRq5uPuWFlaFxnUQXSE2qOM6Tyv8RXNOPWfA== dependencies: "@polkadot/types" "9.6.2" bignumber.js "^9.0.1" lodash "^4.17.15" -"@sora-substrate/type-definitions@1.13.4": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@sora-substrate/type-definitions/-/type-definitions-1.13.4.tgz#60d544f6588786144305a7dfd3397e618296c9ac" - integrity sha512-9TOdFEaJxAjGcsRhD/30Efpt3rdc9kOrnlhJGQNru9QwUOWvuZ0RVi2XXZgVU7l0XVQQW3Jd4Qix9MNO1Gb4kQ== +"@sora-substrate/type-definitions@1.13.8": + version "1.13.8" + resolved "https://registry.yarnpkg.com/@sora-substrate/type-definitions/-/type-definitions-1.13.8.tgz#3470a1cfa6538d30eec12a7c671bac2ac1544653" + integrity sha512-z58/gR90b79w6vCiDCcMykx3n/G5OlFFI/a7ZhnYLv8fnFHjRE1mRE0XbCbYwWLf1n8muM+sgroi5Hqdr0cZXg== dependencies: "@open-web3/orml-type-definitions" "0.9.4-26" -"@sora-substrate/types@1.13.4": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@sora-substrate/types/-/types-1.13.4.tgz#ce7347b7078275f4cb88262f66c88ddc30859892" - integrity sha512-V1uGIlfIaM25lU/hcqGz0R0LJROQgLWmw6tulQIX5/bijH8lzr0GBtj42l4mNTBwRcjRluPy8opuxBo4eX0QyQ== +"@sora-substrate/types@1.13.8": + version "1.13.8" + resolved "https://registry.yarnpkg.com/@sora-substrate/types/-/types-1.13.8.tgz#851936742bcf36f9b357f91090071d2166cff101" + integrity sha512-Hx06P2bTuP/KPJGz8fBgNVO6JDSeHvNFPgwXgACSa28T69HNgUaFr/5WMleCeM13iEZrMVlnofBMHX5cDi703Q== dependencies: "@open-web3/api-mobx" "0.9.4-26" "@open-web3/orml-types" "0.9.4-26" "@polkadot/api" "9.6.2" "@polkadot/typegen" "9.6.2" "@polkadot/types" "9.6.2" - "@sora-substrate/type-definitions" "1.13.4" + "@sora-substrate/type-definitions" "1.13.8" -"@sora-substrate/util@1.13.4": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@sora-substrate/util/-/util-1.13.4.tgz#d24c52d3046dd45a03ca1263b9852a863b909827" - integrity sha512-xM0KRUY5AyVfx7JOymUSE4zNWqwLW71QKJ1rXlpzk0haBbzj8vFLyvxHYvFjklSxpC3sM8cCHQkBva4epg1vRQ== +"@sora-substrate/util@1.13.8": + version "1.13.8" + resolved "https://registry.yarnpkg.com/@sora-substrate/util/-/util-1.13.8.tgz#635b9361b6d1178b3b24624011e0a13d1b442e7d" + integrity sha512-Knd2pRyfFwAokRQF0mNifPi9q1IUDRAUeH4LjX4Q/712VvlG7I8K2S4qBXbn1PNt/g7O0mJjY1No9QT8TRTzVA== dependencies: "@polkadot/ui-keyring" "2.9.14" - "@sora-substrate/api" "1.13.4" - "@sora-substrate/liquidity-proxy" "1.13.4" - "@sora-substrate/math" "1.13.4" - "@sora-substrate/types" "1.13.4" + "@sora-substrate/api" "1.13.8" + "@sora-substrate/liquidity-proxy" "1.13.8" + "@sora-substrate/math" "1.13.8" + "@sora-substrate/types" "1.13.8" axios "^0.21.1" bignumber.js "^9.0.1" crypto-js "^4.0.0" @@ -2597,13 +2597,13 @@ vue-property-decorator "^9.1.2" vuex "^3.6.2" -"@soramitsu/soraneo-wallet-web@1.13.1": - version "1.13.1" - resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.13.1.tgz#326986d846c7e3fcb7671b652e0f82dcb6e05935" - integrity sha512-Y6TF/drUA3C1C9T85gDIKI1+xj194HVlUt2Ivce01IYA6thZGwkRCyzew4wAW3DTLCjRWIMgeUms7RVZ1tpd/g== +"@soramitsu/soraneo-wallet-web@1.13.3": + version "1.13.3" + resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.13.3.tgz#cefdbe65a11575a0708c511f1bb482fcd036c471" + integrity sha512-e4gMcovB+d8KdfpdDjRN8r0kEP1iZ2+UB4GOPeihon5i9LyEgg6a2fzbCTKfSt7xyR6dIa0D+PQaDI0slWDTUA== dependencies: "@polkadot/vue-identicon" "2.9.14" - "@sora-substrate/util" "1.13.4" + "@sora-substrate/util" "1.13.8" "@soramitsu/soramitsu-js-ui" "^1.0.42" "@subwallet/wallet-connect" "^0.2.3" "@urql/core" "^3.0.5" From 0939cda39d2bcd79eae03d6707f2781abbddb027 Mon Sep 17 00:00:00 2001 From: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:06:40 +0300 Subject: [PATCH 02/52] improve btn loading state (#924) --- src/store/swap/actions.ts | 6 ++++-- src/views/Swap.vue | 17 ++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/store/swap/actions.ts b/src/store/swap/actions.ts index e8ee781cd..9c9617654 100644 --- a/src/store/swap/actions.ts +++ b/src/store/swap/actions.ts @@ -63,10 +63,12 @@ const actions = defineActions({ const { commit, state } = swapActionContext(context); const { tokenFromAddress: from, tokenToAddress: to, fromValue, toValue, isExchangeB } = state; if (from && to) { + const [valueFrom, valueTo] = isExchangeB ? [toValue, ''] : ['', fromValue]; + commit.setTokenFromAddress(to); commit.setTokenToAddress(from); - commit.setFromValue(toValue); - commit.setToValue(fromValue); + commit.setFromValue(valueFrom); + commit.setToValue(valueTo); commit.setExchangeB(!isExchangeB); updateTokenSubscription(context, Direction.From); updateTokenSubscription(context, Direction.To); diff --git a/src/views/Swap.vue b/src/views/Swap.vue index 0bb706ed3..ede8517f5 100644 --- a/src/views/Swap.vue +++ b/src/views/Swap.vue @@ -91,7 +91,7 @@ data-test-name="confirmSwap" type="primary" :disabled="isConfirmSwapDisabled" - :loading="isSelectAssetLoading" + :loading="loading || isSelectAssetLoading" @click="handleConfirmSwap" > diff --git a/src/router/index.ts b/src/router/index.ts index d87abcdc0..f8a1ee6e6 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -235,9 +235,6 @@ const routes: Array = [ { path: '*', redirect: '/swap', - // TODO: Turn on redirect to PageNotFound - // name: PageNames.PageNotFound, - // component: lazyComponent(PageNames.PageNotFound) }, ]; @@ -277,10 +274,6 @@ router.beforeEach((to, from, next) => { return; } } - if (!store.getters.settings.soraCardEnabled && to.name === PageNames.SoraCard) { - setRoute(PageNames.Swap); - return; - } setRoute(current, false); }); diff --git a/src/views/Bridge.vue b/src/views/Bridge.vue index 7f907d8ad..4bc5dcbf3 100644 --- a/src/views/Bridge.vue +++ b/src/views/Bridge.vue @@ -493,7 +493,7 @@ export default class Bridge extends Mixins( } getBridgeItemTitle(isSoraNetwork = false): string { - return this.t(this.formatNetwork(isSoraNetwork)); + return this.formatNetwork(isSoraNetwork); } getCopyTooltip(isSoraNetwork = false): string { diff --git a/src/views/BridgeTransaction.vue b/src/views/BridgeTransaction.vue index fc37fb70b..0b4ec68dc 100644 --- a/src/views/BridgeTransaction.vue +++ b/src/views/BridgeTransaction.vue @@ -85,14 +85,12 @@ rel="nofollow noopener" > - {{ t(`transaction.viewIn.${link.type}`) }} + {{ t('transaction.viewIn', { explorer: link.type }) }} - - {{ t('bridgeTransaction.viewInEtherscan') }} - + {{ viewInEtherscan }} @@ -217,14 +215,12 @@ rel="nofollow noopener" > - {{ t(`transaction.viewIn.${link.type}`) }} + {{ t('transaction.viewIn', { explorer: link.type }) }} - - {{ t('bridgeTransaction.viewInEtherscan') }} - + {{ viewInEtherscan }} @@ -353,6 +349,10 @@ export default class BridgeTransaction extends Mixins( @mutation.bridge.setHistoryId private setHistoryId!: (id?: string) => void; @action.bridge.handleBridgeTx private handleBridgeTx!: (id: string) => Promise; + get viewInEtherscan(): string { + return this.t('transaction.viewIn', { explorer: this.TranslationConsts.Etherscan }); + } + get txInProcess(): boolean { if (!this.historyItem?.id) return false; @@ -646,17 +646,31 @@ export default class BridgeTransaction extends Mixins( return []; } if (!this.soraTxId) { - return baseLinks.map(({ type, value }) => ({ type, value: `${value}/block/${txId}` })); + // txId is block + return baseLinks.map(({ type, value }) => { + const link = { type } as WALLET_CONSTS.ExplorerLink; + if (type === WALLET_CONSTS.ExplorerType.Polkadot) { + link.value = `${value}/${txId}`; + } else { + link.value = `${value}/block/${txId}`; + } + return link; + }); } - return baseLinks.map(({ type, value }) => { - const link = { type } as WALLET_CONSTS.ExplorerLink; - if (type === WALLET_CONSTS.ExplorerType.Sorascan) { - link.value = `${value}/transaction/${txId}`; - } else { - link.value = `${value}/extrinsic/${txId}`; - } - return link; - }); + return baseLinks + .map(({ type, value }) => { + const link = { type } as WALLET_CONSTS.ExplorerLink; + if (type === WALLET_CONSTS.ExplorerType.Sorascan) { + link.value = `${value}/transaction/${txId}`; + } else if (WALLET_CONSTS.ExplorerType.Subscan) { + link.value = `${value}/extrinsic/${txId}`; + } else if (this.soraTxBlockId) { + // ExplorerType.Polkadot + link.value = `${value}/${this.soraTxBlockId}`; + } + return link; + }) + .filter((value) => !!value.value); // Polkadot explorer won't be shown without block } get firstTxHash(): string { @@ -754,11 +768,11 @@ export default class BridgeTransaction extends Mixins( } get formattedNetworkStep1(): string { - return this.t(this.formatNetwork(this.isSoraToEvm, true)); + return this.formatNetwork(this.isSoraToEvm, true); } get formattedNetworkStep2(): string { - return this.t(this.formatNetwork(!this.isSoraToEvm, true)); + return this.formatNetwork(!this.isSoraToEvm, true); } get comfirmationBlocksLeft(): number { diff --git a/src/views/SoraCard.vue b/src/views/SoraCard.vue index 2e83c1361..eed1fad66 100644 --- a/src/views/SoraCard.vue +++ b/src/views/SoraCard.vue @@ -10,8 +10,8 @@ import { mixins } from '@soramitsu/soraneo-wallet-web'; import SubscriptionsMixin from '@/components/mixins/SubscriptionsMixin'; import { action, getter } from '@/store/decorators'; -import { lazyComponent } from '@/router'; -import { Components } from '@/consts'; +import { goTo, lazyComponent } from '@/router'; +import { Components, PageNames } from '@/consts'; import { Component, Mixins } from 'vue-property-decorator'; import { VerificationStatus } from '@/types/card'; @@ -31,6 +31,7 @@ enum Step { }) export default class SoraCardIntroPage extends Mixins(mixins.LoadingMixin, SubscriptionsMixin) { @getter.soraCard.currentStatus private currentStatus!: VerificationStatus; + @getter.settings.soraCardEnabled private soraCardEnabled!: boolean; @action.soraCard.getUserStatus private getUserStatus!: AsyncFnWithoutArgs; @action.soraCard.subscribeToTotalXorBalance private subscribeToTotalXorBalance!: AsyncFnWithoutArgs; @@ -65,8 +66,11 @@ export default class SoraCardIntroPage extends Mixins(mixins.LoadingMixin, Subsc } } - async created(): Promise { - await this.subscribeToTotalXorBalance(); + created(): void { + if (!this.soraCardEnabled) { + goTo(PageNames.Swap); + } + this.subscribeToTotalXorBalance(); } async beforeDestroy(): Promise { diff --git a/yarn.lock b/yarn.lock index dd3119443..ccc6c0100 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2597,10 +2597,10 @@ vue-property-decorator "^9.1.2" vuex "^3.6.2" -"@soramitsu/soraneo-wallet-web@1.15.0": - version "1.15.0" - resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.15.0.tgz#270f18f975c511ddaabe937f67dba241435162ed" - integrity sha512-yh4Kz14grcBL0Kyzrkj4+6YJcfuq1bHszCP7P2HLDeiQAZyYAZpK7ORSwC7pBjP0c8y5RO034Rl4gQhQyR9Pgw== +"@soramitsu/soraneo-wallet-web@1.15.1": + version "1.15.1" + resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.15.1.tgz#9d6bde6cc7b6787a1a0c4776b47464f49e64cad7" + integrity sha512-b+Ix0ZQDv+0KmkDmDIPaQzm0YjpA/Zniap98QkQnWPVjxBTpG8N6g0xLubNe9CxqEUsv1yJHOfpejmyhrocnXw== dependencies: "@polkadot/vue-identicon" "2.9.14" "@sora-substrate/util" "1.14.8" From e02c0d1cf25e4bb4a4373cccc8748a7bef3c71d0 Mon Sep 17 00:00:00 2001 From: Stefan Popov Date: Thu, 9 Feb 2023 20:16:22 +0100 Subject: [PATCH 27/52] Fix phone and styles for card (#951) Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> --- src/components/SoraCard/steps/Phone.vue | 13 +++++++++++-- src/components/X1/X1Dialog.vue | 15 +++++++++------ src/store/soraCard/actions.ts | 4 ++-- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/SoraCard/steps/Phone.vue b/src/components/SoraCard/steps/Phone.vue index 2b4e93887..59d6412db 100644 --- a/src/components/SoraCard/steps/Phone.vue +++ b/src/components/SoraCard/steps/Phone.vue @@ -45,7 +45,7 @@ @@ -110,9 +110,9 @@ export default class X1Dialog extends Mixins(mixins.DialogMixin, mixins.LoadingM border-radius: 28px; background-color: var(--s-color-status-error-background); padding: $basic-spacing; - margin-bottom: $basic-spacing / 2; + margin-bottom: $inner-spacing-small; - .disclaimer-warning-icon { + & &-warning-icon { margin-right: $basic-spacing; .s-icon-notifications-alert-triangle-24 { @@ -125,4 +125,7 @@ export default class X1Dialog extends Mixins(mixins.DialogMixin, mixins.LoadingM margin-top: $basic-spacing / 2; } } +[design-system-theme='dark'] .disclaimer-warning-icon .s-icon-notifications-alert-triangle-24 { + color: var(--s-color-base-content-primary); +} diff --git a/src/store/soraCard/actions.ts b/src/store/soraCard/actions.ts index bd0233955..d1b7e8391 100644 --- a/src/store/soraCard/actions.ts +++ b/src/store/soraCard/actions.ts @@ -9,13 +9,13 @@ import { Status } from '@/types/card'; import { loadScript } from 'vue-plugin-load-script'; const actions = defineActions({ - calculateXorRestPrice(context, xorPerEuro): void { + calculateXorRestPrice(context, xorPerEuro: FPNumber): void { const { state, commit } = soraCardActionContext(context); const { totalXorBalance } = state; const euroToPay = FPNumber.HUNDRED.add(FPNumber.ONE).sub(totalXorBalance.mul(xorPerEuro)); const euroToPayInXor = euroToPay.div(xorPerEuro); - commit.setXorPriceToDeposit(euroToPayInXor); + commit.setXorPriceToDeposit(euroToPayInXor.dp(3)); }, async calculateXorBalanceInEuros(context, { xorPerEuro, xorTotalBalance }): Promise { From 5769ed2401b1472ed6949aef6eb3cef8fba4a492 Mon Sep 17 00:00:00 2001 From: Stefan Popov Date: Fri, 10 Feb 2023 08:32:17 +0100 Subject: [PATCH 28/52] Fix sora card phone and route (#952) --- src/components/App/Menu/AppMenu.vue | 1 + src/components/SidebarItemContent.vue | 6 +- src/components/SoraCard/steps/Phone.vue | 88 ++++++++++++++++++++----- src/components/X1/X1Dialog.vue | 2 +- src/store/settings/getters.ts | 4 +- src/views/SoraCard.vue | 18 +++-- 6 files changed, 91 insertions(+), 28 deletions(-) diff --git a/src/components/App/Menu/AppMenu.vue b/src/components/App/Menu/AppMenu.vue index 69b919a66..873ca7da0 100644 --- a/src/components/App/Menu/AppMenu.vue +++ b/src/components/App/Menu/AppMenu.vue @@ -29,6 +29,7 @@ - +
@@ -26,6 +26,7 @@ export default class SidebarItemContent extends Mixins(TranslationMixin) { @Prop({ default: '', type: String }) readonly icon!: string; @Prop({ default: '', type: String }) readonly title!: string; @Prop({ default: 'div', type: String }) readonly tag!: string; + @Prop() readonly tabindex!: string | number; get classes(): Array { const base = 'sidebar-item-content'; @@ -98,4 +99,7 @@ $icon-size: 42px; background-repeat: no-repeat; background-position: center center; } +.el-menu-item:not(.is-active):not(.is-disabled):focus .sora-card-sidebar-icon path { + fill: var(--s-color-base-content-secondary) !important; // focus state of sora card item +} diff --git a/src/components/SoraCard/steps/Phone.vue b/src/components/SoraCard/steps/Phone.vue index 59d6412db..024aa31b3 100644 --- a/src/components/SoraCard/steps/Phone.vue +++ b/src/components/SoraCard/steps/Phone.vue @@ -1,14 +1,24 @@ + + diff --git a/src/components/SoraCard/steps/KycView.vue b/src/components/SoraCard/steps/KycView.vue index a24c4ff23..ed26cba48 100644 --- a/src/components/SoraCard/steps/KycView.vue +++ b/src/components/SoraCard/steps/KycView.vue @@ -158,9 +158,7 @@ export default class KycView extends Mixins(TranslationMixin) { padding: 0; } } - - - - diff --git a/src/components/SoraCard/steps/TermsAndConditions.vue b/src/components/SoraCard/steps/TermsAndConditions.vue index 7c9397737..a9d13fb82 100644 --- a/src/components/SoraCard/steps/TermsAndConditions.vue +++ b/src/components/SoraCard/steps/TermsAndConditions.vue @@ -1,7 +1,7 @@