diff --git a/.gitignore b/.gitignore index 9bdaf08bd..b730a6afe 100644 --- a/.gitignore +++ b/.gitignore @@ -47,8 +47,8 @@ zombienet-macos polkadot astar-collator -# Chopstick binaries -db.sqlite - # Temp folder *temp + +# Chopstick binaries +db.sqlite* diff --git a/package.json b/package.json index f212ee0c3..2f99e8d3f 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,14 @@ "heroku-postbuild": "yarn install && yarn build", "heroku-deploy": "git push heroku main", "playwright:codegen": "npx playwright codegen http://localhost:8080", - "playwright": "BASE_URL='http://localhost:8080' ENDPOINT='ws://127.0.0.1:9944' npx playwright test --project=chromium --debug", + "playwright": "BASE_URL='http://localhost:8080' ENDPOINT='ws://127.0.0.1:9944' npx playwright test --project=chromium", "playwright:ci": "node ./tests/chopsticks/start-chopsticks.js", "generate:meta": "node ./node_modules/.bin/polkadot-types-from-chain --package sample-polkadotjs-typegen/interfaces/ --endpoint ./src/staking-v3/logic/astar.json --output ./src/staking-v3/logic/interfaces/temp", "generate:defs": "node ./node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces/ --input ./src/staking-v3/logic/interfaces/temp --endpoint ./src/staking-v3/logic/astar.json" }, "dependencies": { - "@astar-network/astar-sdk-core": "^0.2.5", - "@astar-network/astar-ui": "^0.0.104", + "@astar-network/astar-sdk-core": "^0.2.7", + "@astar-network/astar-ui": "^0.0.136", "@astar-network/metamask-astar-adapter": "^0.5.4", "@astar-network/metamask-astar-types": "^0.6.1", "@ethersproject/bignumber": "^5.5.0", diff --git a/src/App.vue b/src/App.vue index 297cc0f52..e7cbe47fc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -63,15 +63,12 @@ import { container } from 'src/v2/common'; import { Symbols } from 'src/v2/symbols'; import { useAccount, useAppRouter } from 'src/hooks'; import { LOCAL_STORAGE } from 'src/config/localStorage'; -import { ETHEREUM_EXTENSION } from 'src/hooks'; import { AccountLedgerChangedMessage, IDappStakingRepository, - IDappStakingService, ProtocolStateChangedMessage, - StakerInfoChangedMessage, } from './staking-v3'; -import { useDappStaking } from './staking-v3/hooks'; +import { useDappStaking, useDapps } from './staking-v3/hooks'; export default defineComponent({ name: 'App', @@ -88,7 +85,14 @@ export default defineComponent({ useAppRouter(); const store = useStore(); const { currentAccountName, currentAccount } = useAccount(); - const { getAllRewards, getCurrentEraInfo, getDappTiers } = useDappStaking(); + const { + getAllRewards, + getCurrentEraInfo, + getDappTiers, + fetchStakerInfoToStore, + isDappStakingV3, + } = useDappStaking(); + const { fetchStakeAmountsToStore } = useDapps(); const isLoading = computed(() => store.getters['general/isLoading']); const showAlert = computed(() => store.getters['general/showAlert']); @@ -107,7 +111,7 @@ export default defineComponent({ showDisclaimerModal.value = isOpen; }; - // Handle busy and extrisnsic call status messages. + // Handle busy and extrinsic call status messages. const eventAggregator = container.get(Symbols.EventAggregator); eventAggregator.subscribe(ExtrinsicStatusMessage.name, (m) => { const message = m as ExtrinsicStatusMessage; @@ -140,6 +144,7 @@ export default defineComponent({ // **** dApp staking v3 eventAggregator.subscribe(ProtocolStateChangedMessage.name, async (m) => { + if (!isDappStakingV3.value) return; const message = m as ProtocolStateChangedMessage; store.commit('stakingV3/setProtocolState', message.state, { root: true }); @@ -148,20 +153,18 @@ export default defineComponent({ getAllRewards(), getCurrentEraInfo(), getDappTiers(message.state.era - 1), + fetchStakeAmountsToStore(), + fetchStakerInfoToStore(), ]); }); eventAggregator.subscribe(AccountLedgerChangedMessage.name, (m) => { + if (!isDappStakingV3.value) return; const message = m as AccountLedgerChangedMessage; store.commit('stakingV3/setLedger', message.ledger, { root: true }); console.log('ledger', message.ledger); }); - eventAggregator.subscribe(StakerInfoChangedMessage.name, (m) => { - const message = m as StakerInfoChangedMessage; - store.commit('stakingV3/setStakerInfo', message.stakerInfo, { root: true }); - }); - // **** end dApp staking v3 // Handle wallet change so we can inject proper wallet @@ -170,14 +173,13 @@ export default defineComponent({ setCurrentWallet(isEthWallet.value, currentWallet.value); // Subscribe to an account specific dApp staking v3 data. + if (!isDappStakingV3.value) return; if (currentAccount.value && currentAccount.value !== previousAddress) { container .get(Symbols.DappStakingRepositoryV3) .startAccountLedgerSubscription(currentAccount.value); - - container - .get(Symbols.DappStakingRepositoryV3) - .startGetStakerInfoSubscription(currentAccount.value); + fetchStakerInfoToStore(); + getAllRewards(); previousAddress = currentAccount.value; } diff --git a/src/assets/img/account_bg_native.webp b/src/assets/img/account_bg_native.webp new file mode 100644 index 000000000..4f71b8673 Binary files /dev/null and b/src/assets/img/account_bg_native.webp differ diff --git a/src/assets/img/account_bg_shiden.webp b/src/assets/img/account_bg_shiden.webp new file mode 100644 index 000000000..410036d4b Binary files /dev/null and b/src/assets/img/account_bg_shiden.webp differ diff --git a/src/assets/img/account_bg_testnet.webp b/src/assets/img/account_bg_testnet.webp new file mode 100644 index 000000000..e5619777b Binary files /dev/null and b/src/assets/img/account_bg_testnet.webp differ diff --git a/src/assets/img/account_bg_testnet_zk.webp b/src/assets/img/account_bg_testnet_zk.webp new file mode 100644 index 000000000..9c64aa1ef Binary files /dev/null and b/src/assets/img/account_bg_testnet_zk.webp differ diff --git a/src/assets/img/account_bg_zk.webp b/src/assets/img/account_bg_zk.webp new file mode 100644 index 000000000..56323e849 Binary files /dev/null and b/src/assets/img/account_bg_zk.webp differ diff --git a/src/assets/img/assets_bg_dark.webp b/src/assets/img/assets_bg_dark.webp new file mode 100644 index 000000000..25dec5768 Binary files /dev/null and b/src/assets/img/assets_bg_dark.webp differ diff --git a/src/assets/img/assets_bg_dark_A.webp b/src/assets/img/assets_bg_dark_A.webp new file mode 100644 index 000000000..45f458228 Binary files /dev/null and b/src/assets/img/assets_bg_dark_A.webp differ diff --git a/src/assets/img/assets_bg_light.webp b/src/assets/img/assets_bg_light.webp new file mode 100644 index 000000000..8989f5ffa Binary files /dev/null and b/src/assets/img/assets_bg_light.webp differ diff --git a/src/assets/img/assets_icon_dark.svg b/src/assets/img/assets_icon_dark.svg new file mode 100644 index 000000000..2358c09dc --- /dev/null +++ b/src/assets/img/assets_icon_dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/img/assets_icon_light.svg b/src/assets/img/assets_icon_light.svg new file mode 100644 index 000000000..367c6f385 --- /dev/null +++ b/src/assets/img/assets_icon_light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/img/bg_common.webp b/src/assets/img/bg_common.webp new file mode 100644 index 000000000..d8bb1bf87 Binary files /dev/null and b/src/assets/img/bg_common.webp differ diff --git a/src/assets/img/icon_astar2.svg b/src/assets/img/icon_astar2.svg new file mode 100644 index 000000000..4fa2bac20 --- /dev/null +++ b/src/assets/img/icon_astar2.svg @@ -0,0 +1,1152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/icon_docs.svg b/src/assets/img/icon_docs.svg new file mode 100644 index 000000000..a43bdabe7 --- /dev/null +++ b/src/assets/img/icon_docs.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/icon_forum.svg b/src/assets/img/icon_forum.svg new file mode 100644 index 000000000..9c51bd95b --- /dev/null +++ b/src/assets/img/icon_forum.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/icon_home.svg b/src/assets/img/icon_home.svg new file mode 100644 index 000000000..3ae0d3471 --- /dev/null +++ b/src/assets/img/icon_home.svg @@ -0,0 +1,1409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/icon_startale.svg b/src/assets/img/icon_startale.svg new file mode 100644 index 000000000..c23f5bef9 --- /dev/null +++ b/src/assets/img/icon_startale.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/icon_tech_stack.svg b/src/assets/img/icon_tech_stack.svg new file mode 100644 index 000000000..89e235e1a --- /dev/null +++ b/src/assets/img/icon_tech_stack.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/zkevm_text_bg.webp b/src/assets/img/zkevm_text_bg.webp new file mode 100644 index 000000000..069cb868f Binary files /dev/null and b/src/assets/img/zkevm_text_bg.webp differ diff --git a/src/components/assets/Account.vue b/src/components/assets/Account.vue index e5329cab2..74152287f 100644 --- a/src/components/assets/Account.vue +++ b/src/components/assets/Account.vue @@ -1,87 +1,118 @@ @@ -111,6 +142,7 @@ import { getEvmMappedSs58Address, setAddressMapping } from 'src/hooks/helper/add import { useStore } from 'src/store'; import { computed, defineComponent, ref, watch, watchEffect } from 'vue'; import { useI18n } from 'vue-i18n'; +import Rewards from 'src/components/assets/Rewards.vue'; export default defineComponent({ components: { @@ -118,6 +150,7 @@ export default defineComponent({ EvmNativeToken, ZkAstr, AuIcon, + Rewards, }, props: { ttlErc20Amount: { @@ -240,6 +273,27 @@ export default defineComponent({ { immediate: false } ); + const bg_img = { + native: require('/src/assets/img/account_bg_native.webp'), + shiden: require('/src/assets/img/account_bg_shiden.webp'), + testnet: require('/src/assets/img/account_bg_testnet.webp'), + zk: require('/src/assets/img/account_bg_zk.webp'), + testnet_zk: require('/src/assets/img/account_bg_testnet_zk.webp'), + }; + + const bg = computed(() => { + if (currentNetworkIdx.value === endpointKey.ASTAR) { + return bg_img.native; + } else if (currentNetworkIdx.value === endpointKey.SHIDEN) { + return bg_img.shiden; + } else if (currentNetworkIdx.value === endpointKey.ZKATANA) { + return bg_img.testnet_zk; + } + return bg_img.testnet; + }); + + const currentNetworkName = ref(providerEndpoints[currentNetworkIdx.value].displayName); + return { iconWallet, currentAccountName, @@ -260,6 +314,9 @@ export default defineComponent({ unifiedAccount, isAccountUnified, isZkEvm, + bg, + currentNetworkIdx, + currentNetworkName, getShortenAddress, copyAddress, showAccountUnificationModal, diff --git a/src/components/assets/AssetSearchOption.vue b/src/components/assets/AssetSearchOption.vue index b42d8aa9b..6e1312886 100644 --- a/src/components/assets/AssetSearchOption.vue +++ b/src/components/assets/AssetSearchOption.vue @@ -1,27 +1,14 @@ diff --git a/src/components/assets/EvmAssetList.vue b/src/components/assets/EvmAssetList.vue index 10a83d8fd..cd4d86c94 100644 --- a/src/components/assets/EvmAssetList.vue +++ b/src/components/assets/EvmAssetList.vue @@ -1,36 +1,44 @@ @@ -42,6 +50,7 @@ import EvmCbridgeToken from 'src/components/assets/EvmCbridgeToken.vue'; import { useNetworkInfo } from 'src/hooks'; import { Erc20Token } from 'src/modules/token'; import { PropType, computed, defineComponent, ref } from 'vue'; +import { useStore } from 'src/store'; export default defineComponent({ components: { @@ -97,6 +106,13 @@ export default defineComponent({ search.value = event.target.value; }; + const store = useStore(); + const isDarkTheme = computed(() => store.getters['general/theme'] === 'DARK'); + const icon_img = { + light: require('/src/assets/img/assets_icon_light.svg'), + dark: require('/src/assets/img/assets_icon_dark.svg'), + }; + return { symbol, token, @@ -106,6 +122,8 @@ export default defineComponent({ filteredTokens, cbridgeAppLink, isHideSmallBalances, + isDarkTheme, + icon_img, setIsSearch, checkIsCbridgeToken, toggleIsHideSmallBalances, diff --git a/src/components/assets/EvmCbridgeToken.vue b/src/components/assets/EvmCbridgeToken.vue index a42b28c6b..b280a184a 100644 --- a/src/components/assets/EvmCbridgeToken.vue +++ b/src/components/assets/EvmCbridgeToken.vue @@ -1,87 +1,110 @@ @@ -91,16 +114,16 @@ import { SupportWallet } from 'src/config/wallets'; import { addToEvmProvider, getEvmProvider } from 'src/hooks/helper/wallet'; import { Erc20Token, getErc20Explorer, getTokenImage } from 'src/modules/token'; import { useStore } from 'src/store'; -import { computed, defineComponent, PropType } from 'vue'; +import { computed, defineComponent, PropType, ref } from 'vue'; import { buildTransferPageLink } from 'src/router/routes'; -import { useNetworkInfo } from 'src/hooks'; +import { useNetworkInfo, useBreakpoints } from 'src/hooks'; import Jazzicon from 'vue3-jazzicon/src/components'; import TokenBalance from 'src/components/common/TokenBalance.vue'; +import { truncate } from '@astar-network/astar-sdk-core'; export default defineComponent({ components: { [Jazzicon.name]: Jazzicon, - TokenBalance, }, props: { token: { @@ -109,6 +132,8 @@ export default defineComponent({ }, }, setup({ token }) { + const isExpand = ref(false); + const tokenImg = computed(() => getTokenImage({ isNativeToken: false, symbol: token.symbol, iconUrl: token.image }) ); @@ -134,12 +159,24 @@ export default defineComponent({ const currentWallet = computed(() => store.getters['general/currentWallet']); const provider = getEvmProvider(currentWallet.value); + const { width, screenSize } = useBreakpoints(); + + const isTruncate = !token.symbol.toUpperCase().includes('BTC'); + + const isFavorite = ref(false); + return { tokenImg, nativeTokenSymbol, explorerLink, cbridgeAppLink, provider, + width, + screenSize, + isExpand, + isTruncate, + isFavorite, + truncate, buildTransferPageLink, formatTokenName, addToEvmProvider, @@ -149,5 +186,5 @@ export default defineComponent({ diff --git a/src/components/assets/EvmNativeToken.vue b/src/components/assets/EvmNativeToken.vue index fcadbc7f2..3a4243881 100644 --- a/src/components/assets/EvmNativeToken.vue +++ b/src/components/assets/EvmNativeToken.vue @@ -1,69 +1,83 @@ @@ -74,15 +88,16 @@ import { cbridgeAppLink } from 'src/c-bridge'; import ModalFaucet from 'src/components/assets/modals/ModalFaucet.vue'; import TokenBalance from 'src/components/common/TokenBalance.vue'; import { faucetBalRequirement } from 'src/config/wallets'; -import { useAccount, useNetworkInfo, usePrice } from 'src/hooks'; +import { useAccount, useNetworkInfo, usePrice, useBreakpoints } from 'src/hooks'; import { getTokenImage } from 'src/modules/token'; import { buildTransferPageLink, buildEthereumBridgePageLink } from 'src/router/routes'; import { useStore } from 'src/store'; import { computed, defineComponent, ref, watchEffect } from 'vue'; import { faucetSethLink } from 'src/links'; +import { truncate } from '@astar-network/astar-sdk-core'; export default defineComponent({ - components: { ModalFaucet, TokenBalance }, + components: { ModalFaucet }, setup() { const bal = ref(0); const balUsd = ref(0); @@ -132,6 +147,10 @@ export default defineComponent({ isModalFaucet.value = isOpen; }; + const { width, screenSize } = useBreakpoints(); + + const isTruncate = !nativeTokenSymbol.value.toUpperCase().includes('BTC'); + return { nativeTokenImg, nativeTokenSymbol, @@ -144,6 +163,10 @@ export default defineComponent({ isZkEvm, isZkatana, faucetSethLink, + width, + screenSize, + isTruncate, + truncate, handleModalFaucet, buildTransferPageLink, buildEthereumBridgePageLink, diff --git a/src/components/assets/NativeAssetList.vue b/src/components/assets/NativeAssetList.vue index 8cd2ae86a..d702e8952 100644 --- a/src/components/assets/NativeAssetList.vue +++ b/src/components/assets/NativeAssetList.vue @@ -1,223 +1,239 @@ diff --git a/src/components/dapp-staking/dapp/ProjectDetails.vue b/src/components/dapp-staking/dapp/ProjectDetails.vue index fd789cd1a..5b66b49d7 100644 --- a/src/components/dapp-staking/dapp/ProjectDetails.vue +++ b/src/components/dapp-staking/dapp/ProjectDetails.vue @@ -65,13 +65,15 @@ {{ $t('copy') }} - + @@ -223,9 +225,15 @@ export default defineComponent({ const { currentNetworkIdx } = useNetworkInfo(); const store = useStore(); const { t } = useI18n(); - const blockscout = computed( - () => `${providerEndpoints[currentNetworkIdx.value].blockscout}/address/` - ); + + const explorerUrl = computed(() => { + const address = props.dapp.dapp.address; + const blockscout = `${providerEndpoints[currentNetworkIdx.value].blockscout}/address/`; + const subscan = `${providerEndpoints[currentNetworkIdx.value].subscan}/account/`; + const explorer = address.startsWith('0x') ? blockscout : subscan; + return explorer + address; + }); + const copyAddress = (address: string): void => { copy(address); store.dispatch('general/showAlertMsg', { @@ -263,7 +271,7 @@ export default defineComponent({ getShortenAddress, copyAddress, goLink, - blockscout, + explorerUrl, communities, virtualMachineTags, CommunityType, diff --git a/src/components/dapp-staking/my-staking/AdsArea.vue b/src/components/dapp-staking/my-staking/AdsArea.vue index 4303a47e7..5fd5d7462 100644 --- a/src/components/dapp-staking/my-staking/AdsArea.vue +++ b/src/components/dapp-staking/my-staking/AdsArea.vue @@ -6,7 +6,6 @@ :slides-per-group="1" :space-between="24" :navigation="true" - :parallax="true" :modules="modules" :breakpoints="{ '768': { diff --git a/src/components/dapp-staking/my-staking/DynamicAdsArea.vue b/src/components/dapp-staking/my-staking/DynamicAdsArea.vue index 9e83004f5..6a858face 100644 --- a/src/components/dapp-staking/my-staking/DynamicAdsArea.vue +++ b/src/components/dapp-staking/my-staking/DynamicAdsArea.vue @@ -6,7 +6,6 @@ :slides-per-group="1" :space-between="16" :navigation="true" - :parallax="true" :modules="modules" :breakpoints="{ '768': { diff --git a/src/components/dapp-staking/my-staking/MyRewards.vue b/src/components/dapp-staking/my-staking/MyRewards.vue index 8e5124e6e..e352e050e 100644 --- a/src/components/dapp-staking/my-staking/MyRewards.vue +++ b/src/components/dapp-staking/my-staking/MyRewards.vue @@ -138,11 +138,15 @@
{{ $t('dappStaking.cantClaimWihtoutError') }}
-
{{ $t('new') }} {{ $t('myReward.dappsOwners') }} - {{ $t('myReward.dappsOwnersLink') }} + {{ $t('myReward.dappsOwnersLink') }}
diff --git a/src/components/dapp-staking/register/RegisterDapp.vue b/src/components/dapp-staking/register/RegisterDapp.vue index 20d29b88a..f128442c2 100644 --- a/src/components/dapp-staking/register/RegisterDapp.vue +++ b/src/components/dapp-staking/register/RegisterDapp.vue @@ -252,7 +252,11 @@ export default defineComponent({ (await service.getRegisteredContract(currentAddress.value)); data.address = developerContract ?? ''; if (data.address && currentNetworkName.value) { - const registeredDapp = await service.getDapp(data.address, currentNetworkName.value); + const registeredDapp = await service.getDapp( + data.address, + currentNetworkName.value, + true + ); isNewDapp.value = !registeredDapp; if (registeredDapp && !registeredDapp.tags) { registeredDapp.tags = []; @@ -422,7 +426,7 @@ export default defineComponent({ diff --git a/src/components/header/ConnectButton.vue b/src/components/header/ConnectButton.vue index caae54b79..8c1a2d869 100644 --- a/src/components/header/ConnectButton.vue +++ b/src/components/header/ConnectButton.vue @@ -1,13 +1,8 @@ @@ -32,113 +27,32 @@ export default defineComponent({ @import 'src/css/utils.scss'; .btn--connect { - display: flex; - height: 32px; - color: $navy-1; - flex-direction: row; - align-items: center; - padding: 8px 16px 8px 16px; - background: transparent; - border-radius: 16px; - margin-left: 8px; - transition: all 0.3s ease 0s; - border: 1px solid $gray-4; - - @media (min-width: $lg) { - border: 1px solid $navy-3; - } - - @media (min-width: $sm) { - margin-left: 16px; - } -} -.btn--connect:hover { - background: $astar-blue !important; - border: 1px solid transparent; - .iconbase { - color: $gray-1; - } - @media (min-width: $lg) { - background: transparent !important; - border: 1px solid $gray-4; - .iconbase { - color: $gray-5; - } - } -} - -.m-btn--connect { - padding-left: 10px; + color: white; width: 32px; height: 32px; - background: transparent; - border: 1px solid $gray-4; border-radius: 16px; - margin-left: 16px; - transition: all 0.3s ease 0s; - @media (min-width: $lg) { - border: 1px solid $navy-3; + border: solid 1px white; + display: flex; + justify-content: center; + align-items: center; + transition: all 0.2s ease; + &:hover { + border-color: $astar-blue; + background-color: $astar-blue; } -} -.m-btn--connect:hover { - background: $astar-blue; - border: 1px solid transparent; @media (min-width: $lg) { - background: #fff; - } - .iconbase { - color: $gray-1; + width: 40px; + height: 40px; + border-radius: 20px; } } -.iconbase { - color: $gray-4; - width: rem(20); - height: rem(20); - margin-left: -4px; - margin-right: 4px; - transition: all 0.3s ease 0s; -} -.text--connect { - font-weight: 400; - font-size: 14px; - color: $gray-1; +.iconbase { + width: 18px; + height: 18px; @media (min-width: $lg) { - color: $navy-1; - } -} - -.body--dark { - .btn--connect { - background: transparent; - color: #fff; - border: 1px solid $gray-4; - } - .btn--connect:hover { - background: $astar-blue !important; - border: 1px solid transparent; - .iconbase { - color: $gray-1; - } - } - .iconbase { - color: $gray-3; - } - - .m-btn--connect { - background: transparent; - color: $gray-3; - border: 1px solid $gray-4; - } - .m-btn--connect:hover { - background: $astar-blue; - border: 1px solid transparent; - .iconbase { - color: $gray-1; - } - } - .text--connect { - color: $gray-1; + width: 20px; + height: 20px; } } diff --git a/src/components/header/Header.vue b/src/components/header/Header.vue index a2dfb13d7..675bdd9f2 100644 --- a/src/components/header/Header.vue +++ b/src/components/header/Header.vue @@ -1,15 +1,17 @@