Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated bridge page styling #1200

Merged
merged 7 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 10 additions & 26 deletions src/components/assets/Assets.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div v-if="xcmAssets.assets.length > 0 || !isLoading" class="wrapper--assets">
<div class="assets-page-bg" :style="{ backgroundImage: `url(${bg})` }" />
<div class="container--assets">
<div class="column--main">
<register-banner v-if="isDappStakingV3" />
Expand Down Expand Up @@ -70,25 +69,25 @@
<script lang="ts">
import { isValidEvmAddress } from '@astar-network/astar-sdk-core';
import Account from 'src/components/assets/Account.vue';
import SideAds from 'src/components/assets/SideAds.vue';
import AstarDomains from 'src/components/header/mobile/AstarDomains.vue';
import AnchorLinks from 'src/components/assets/AnchorLinks.vue';
import EvmAssetList from 'src/components/assets/EvmAssetList.vue';
import EvmNativeToken from 'src/components/assets/EvmNativeToken.vue';
import NativeAssetList from 'src/components/assets/NativeAssetList.vue';
import SideAds from 'src/components/assets/SideAds.vue';
import XcmNativeAssetList from 'src/components/assets/XcmNativeAssetList.vue';
import YourProject from 'src/components/assets/YourProject.vue';
import ZkAstr from 'src/components/assets/ZkAstr.vue';
import AstarDomains from 'src/components/header/mobile/AstarDomains.vue';
import { providerEndpoints } from 'src/config/chainEndpoints';
import { LOCAL_STORAGE } from 'src/config/localStorage';
import { useAccount, useBalance, useDispatchGetDapps, useNetworkInfo } from 'src/hooks';
import { useDappStaking, CombinedDappInfo, useDapps } from 'src/staking-v3';
import { CombinedDappInfo, useDappStaking, useDapps } from 'src/staking-v3';
import RegisterBanner from 'src/staking-v3/components/RegisterBanner.vue';
import Staking from 'src/staking-v3/components/my-staking/Staking.vue';
import { useStore } from 'src/store';
import { EvmAssets, XcmAssets, XvmAssets } from 'src/store/assets/state';
import { Asset } from 'src/v2/models';
import { computed, defineComponent, onUnmounted, ref, watch, watchEffect } from 'vue';
import Staking from 'src/staking-v3/components/my-staking/Staking.vue';
import EvmNativeToken from 'src/components/assets/EvmNativeToken.vue';
import NativeAssetList from 'src/components/assets/NativeAssetList.vue';
import ZkAstr from 'src/components/assets/ZkAstr.vue';
import AnchorLinks from 'src/components/assets/AnchorLinks.vue';
import RegisterBanner from 'src/staking-v3/components/RegisterBanner.vue';

export default defineComponent({
components: {
Expand Down Expand Up @@ -212,27 +211,13 @@ export default defineComponent({
window.removeEventListener(event, handler);
});

const isDarkTheme = computed<boolean>(() => store.getters['general/theme'] === 'DARK');

const bg_img = {
light: require('/src/assets/img/assets_bg_light.webp'),
dark: require('/src/assets/img/assets_bg_dark_A.webp'),
};

const bg = computed<String>(() => {
if (isDarkTheme.value) {
return bg_img.dark;
}
return bg_img.light;
});

const { allDapps } = useDapps();
const ownDapps = computed<CombinedDappInfo[]>(() => {
if (!allDapps.value) return [];
return allDapps.value.filter((dapp) => dapp.chain.owner === currentAccount.value);
});

const isDappOwner = computed<Boolean>(() => {
const isDappOwner = computed<boolean>(() => {
if (ownDapps.value.length > 0) return true;
return false;
});
Expand All @@ -255,7 +240,6 @@ export default defineComponent({
accountData,
isModalXcmBridge,
isLoading,
bg,
isDappStakingV3,
nativeTokenSymbol,
isZkEvm,
Expand Down
17 changes: 0 additions & 17 deletions src/components/assets/styles/assets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,6 @@
}
}

.assets-page-bg {
background-repeat: no-repeat;
background-size: cover;
background-position: center;
z-index: -1;
position: fixed;
left: 0;
top: 0;
width: 100vw;
@media (orientation: landscape) {
height: 100vh;
}
@media (orientation: portrait) {
height: 100vh;
}
}

.container--assets {
width: 100%;
max-width: $container-max-width;
Expand Down
4 changes: 0 additions & 4 deletions src/components/assets/transfer/styles/mobile-navigator.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import 'src/css/quasar.variables.scss';

.wrapper--mobile-navigator {
background: white;
margin-left: -16px;
margin-right: -16px;
margin-top: 16px;
Expand Down Expand Up @@ -37,9 +36,6 @@
}

.body--dark {
.wrapper--mobile-navigator {
background: $container-bg-dark;
}
.circle--button {
color: $gray-4;
border: 1px solid $gray-4;
Expand Down
178 changes: 102 additions & 76 deletions src/components/bridge/BridgeSelection.vue
Original file line number Diff line number Diff line change
@@ -1,84 +1,110 @@
<template>
<div class="wrapper--bridge-selection">
<div class="container--selection">
<div class="column--selection">
<button :disabled="!isEnableEthBridge">
<component
:is="isEnableEthBridge ? 'router-link' : 'div'"
:to="buildEthereumBridgePageLink()"
class="button--bridge"
>
<div class="row--title">
<img class="img--logo" :src="require('src/assets/img/ethereum.png')" alt="ethereum" />
<span class="text--bridge-title">{{ $t('bridge.ethereumBridge.title') }}</span>
</div>
<div class="box--text-bridge">
<span class="text--bridge">
{{ $t('bridge.ethereumBridge.text', { l1: l1Name, l2: l2Name }) }}
</span>
</div>
</component>
</button>
<p class="text--bridge">
{{ $t('bridge.ethereumBridge.text2') }}
<a
href="https://docs.astar.network/docs/build/zkEVM/bridge-to-zkevm"
target="_blank"
rel="noopener noreferrer"
>
{{ $t('bridge.ethereumBridge.lean') }}
</a>
</p>
<div class="container--box">
<div class="container--title">
<span>{{ $t('bridge.selectBridge') }}</span>
</div>
<div class="container--selection">
<div class="column--selection">
<button :disabled="!isEnableEthBridge">
<component
:is="isEnableEthBridge ? 'router-link' : 'div'"
:to="buildEthereumBridgePageLink()"
class="button--bridge"
>
<div class="row--logo-bg">
<div class="img--logo-bg">
<img
class="img--logo"
:src="require('src/assets/img/ethereum.png')"
alt="ethereum"
/>
</div>
</div>
<div class="row--bridge-title">
<span class="text--bridge-title">{{ $t('bridge.ethereumBridge.title') }}</span>
<div class="box--text-bridge">
<span class="text--bridge">
{{ $t('bridge.ethereumBridge.text', { l1: l1Name, l2: l2Name }) }}
</span>
</div>
</div>
</component>
</button>
<p class="text--bridge-details">
{{ $t('bridge.ethereumBridge.text2') }}
<a
href="https://docs.astar.network/docs/build/zkEVM/bridge-to-zkevm"
target="_blank"
rel="noopener noreferrer"
>
{{ $t('bridge.ethereumBridge.lean') }}
</a>
</p>
</div>

<div class="column--selection">
<button :disabled="!isEnableAstrBridge">
<component
:is="isEnableAstrBridge ? 'router-link' : 'div'"
:to="buildEthereumBridgePageLink()"
class="button--bridge"
>
<div class="row--title">
<img
class="img--logo"
:src="require('src/assets/img/chain/astar.png')"
alt="ethereum"
/>
<span class="text--bridge-title">{{ $t('bridge.astarBridge.title') }}</span>
</div>
<div class="box--text-bridge">
<span class="text--bridge">
{{
$t('bridge.astarBridge.text', { substrateNetwork: substrateNetwork, l2: l2Name })
}}
</span>
</div>
</component>
</button>
<p class="text--bridge">{{ $t('bridge.astarBridge.text2') }}</p>
</div>
<div class="column--selection">
<button :disabled="!isEnableAstrBridge">
<component
:is="isEnableAstrBridge ? 'router-link' : 'div'"
:to="buildEthereumBridgePageLink()"
class="button--bridge"
>
<div class="row--logo-bg">
<div class="img--logo-bg">
<img
class="img--logo"
:src="require('src/assets/img/chain/astar.png')"
alt="astar-bridge"
/>
</div>
</div>
<div class="row--bridge-title">
<span class="text--bridge-title">{{ $t('bridge.astarBridge.title') }}</span>
<div class="box--text-bridge">
<span class="text--bridge">
{{
$t('bridge.astarBridge.text', {
substrateNetwork: substrateNetwork,
l2: l2Name,
})
}}
</span>
</div>
</div>
</component>
</button>
<p class="text--bridge-details">{{ $t('bridge.astarBridge.text2') }}</p>
</div>

<div class="column--selection">
<button>
<a
:href="cbridgeAppLink"
target="_blank"
rel="noopener noreferrer"
class="button--bridge"
>
<div class="row--title">
<img
class="img--logo"
:src="require('src/assets/img/cbridge_logo.svg')"
alt="ethereum"
/>
<span class="text--bridge-title">{{ $t('bridge.celetBridge.title') }}</span>
</div>
<span class="text--bridge">{{
$t('bridge.celetBridge.text', { cbridgeNetworkName: cbridgeNetworkName })
}}</span>
</a>
</button>
<div class="column--selection">
<button>
<a
:href="cbridgeAppLink"
target="_blank"
rel="noopener noreferrer"
class="button--bridge"
>
<div class="row--logo-bg">
<div class="img--logo-bg">
<img
class="img--logo"
:src="require('src/assets/img/cbridge_logo.svg')"
alt="cbridge"
/>
</div>
</div>
<div class="row--bridge-title">
<span class="text--bridge-title">{{ $t('bridge.celetBridge.title') }}</span>
<div class="box--text-bridge">
<span class="text--bridge">
{{ $t('bridge.celetBridge.text', { cbridgeNetworkName: cbridgeNetworkName }) }}
</span>
</div>
</div>
</a>
</button>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/bridge/ethereum/L1History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
</div>
<div v-else>
<div v-if="isLoadingHistories">{{ $t('common.loading') }}</div>
<div v-else>{{ $t('bridge.noHistory') }}</div>
<div v-else>{{ $t('bridge.noTransactions') }}</div>
</div>
</div>
</template>
Expand Down
Loading
Loading