From 5c5dd0210960043387498839bcbbb0ff0f31b359 Mon Sep 17 00:00:00 2001 From: Bobo Date: Tue, 13 Feb 2024 10:02:08 +0100 Subject: [PATCH 1/4] Enable dApp staking v3 on Astar (#1182) --- src/router/index.ts | 20 +------------------- src/router/routes.ts | 8 +------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 3cfefb206..96cdba37a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -6,8 +6,7 @@ import { createWebHistory, } from 'vue-router'; import { StateInterface } from 'src/store'; -import routes, { Path } from 'src/router/routes'; -import { $api } from '../boot/api'; +import routes from 'src/router/routes'; export { Path } from 'src/router/routes'; export { getHeaderName, buildTransferPageLink } from 'src/router/utils'; @@ -38,22 +37,5 @@ export default route(function (/* { store, ssrContext } */) { history: createHistory(process.env.MODE === 'ssr' ? void 0 : process.env.VUE_ROUTER_BASE), }); - // TODO - remove after the portal v3 is live. - Router.beforeEach((to, from, next) => { - // Prevent accessing to dApp staking pages if v3 is deployed to a node, but not supported by UI - const networksSupportV3 = ['development', 'shibuya-testnet', 'custom-node', 'shiden']; - const isStakingV3 = $api?.query.hasOwnProperty('dappStaking'); - const dontNavigateToDappStaking = - to.path.includes('/dapp-staking') && - !to.path.includes('/maintenance') && - !networksSupportV3.includes(to.params?.network?.toString()); - - if (isStakingV3 && dontNavigateToDappStaking) { - next({ path: Path.DappStaking + Path.Maintenance }); - } else { - next(); - } - }); - return Router; }); diff --git a/src/router/routes.ts b/src/router/routes.ts index ed6bda4df..b1ed6753d 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -8,7 +8,6 @@ import XvmTransfer from 'pages/XvmTransfer.vue'; import { endpointKey, getNetworkName } from 'src/config/chainEndpoints'; import { LOCAL_STORAGE } from 'src/config/localStorage'; import Store from 'src/pages/DappStaking.vue'; -import StakingTop from 'components/dapp-staking/StakingTop.vue'; import Dashboard from 'src/pages/Dashboard.vue'; import RegisterDapp from 'src/pages/RegisterDapp.vue'; import StakeManage from 'src/pages/StakeManage.vue'; @@ -153,12 +152,7 @@ const routes: RouteRecordRaw[] = [ }, { path: 'discover', - component: - networkParam === '/development' || - networkParam === '/shibuya-testnet' || - networkParam === '/shiden' - ? DiscoverV3 - : StakingTop, + component: DiscoverV3, }, { path: 'owner', From 378bee2ef3f4d0d52fe9e586eab17d00ddd809e2 Mon Sep 17 00:00:00 2001 From: Ayumi Takahashi Date: Tue, 13 Feb 2024 21:50:40 -0800 Subject: [PATCH 2/4] Add text ellipsis to the dApp cards (#1186) * add text ellipsis to the dapp card * update * Revert "update" This reverts commit 29c7d3f2ef0bdf0aed6b4b9edfc4f9e4b55052a6. * fix the arrow style of the ads section * fix builders card layout * fix dapp page short description --- src/staking-v3/components/DynamicAdsArea.vue | 26 ++++++++++++++++++ src/staking-v3/components/dapp/DappAvatar.vue | 6 ++--- .../components/dapp/styles/builders.scss | 12 ++++++--- .../components/dapp/styles/dapp-avatar.scss | 27 +++++++++++-------- src/staking-v3/components/styles/dapps.scss | 12 ++++++++- 5 files changed, 64 insertions(+), 19 deletions(-) diff --git a/src/staking-v3/components/DynamicAdsArea.vue b/src/staking-v3/components/DynamicAdsArea.vue index 7ef4dad5e..4a243f4e9 100644 --- a/src/staking-v3/components/DynamicAdsArea.vue +++ b/src/staking-v3/components/DynamicAdsArea.vue @@ -95,3 +95,29 @@ export default defineComponent({ + + diff --git a/src/staking-v3/components/dapp/DappAvatar.vue b/src/staking-v3/components/dapp/DappAvatar.vue index 481f7883e..fe7d34254 100644 --- a/src/staking-v3/components/dapp/DappAvatar.vue +++ b/src/staking-v3/components/dapp/DappAvatar.vue @@ -1,15 +1,15 @@