Skip to content
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
9 changes: 3 additions & 6 deletions src/components/assets/DynamicLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:key="index"
class="card"
:style="`background-image: url('${t.background}'); background-size: cover; background-position: center;`"
@click="goToLink(t.link)"
@click="navigateInNewTab(t.link)"
>
<div class="card--info">
<div
Expand All @@ -28,6 +28,7 @@ import linksData from 'src/data/dynamic_links.json';
import { useI18n } from 'vue-i18n';
import { useQuery } from '@vue/apollo-composable';
import gql from 'graphql-tag';
import { navigateInNewTab } from 'src/util-general';

interface Data {
background: string;
Expand Down Expand Up @@ -86,14 +87,10 @@ export default defineComponent({
{ immediate: true }
);

const goToLink = (link: string): void => {
window.open(link, '_blank');
};

return {
truncate,
items,
goToLink,
navigateInNewTab,
};
},
});
Expand Down
12 changes: 7 additions & 5 deletions src/components/assets/SideAds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<swiper-slide v-for="(item, index) in combinedCampaigns" :key="index">
<div
class="card--swiper"
@click="item.link !== undefined ? goToLink(item.link) : goDappPageLink(item.address)"
@click="
item.link !== undefined ? navigateInNewTab(item.link) : goDappPageLink(item.address)
"
>
<img :src="item.img" class="card__img" />
<div class="card__bottom">
Expand Down Expand Up @@ -34,6 +36,8 @@ import { Swiper, SwiperSlide } from 'swiper/vue';
import 'swiper/css';
import 'swiper/css/navigation';
import { Autoplay } from 'swiper/modules';
import { navigateInNewTab } from 'src/util-general';

export default defineComponent({
components: {
Swiper,
Expand All @@ -42,9 +46,6 @@ export default defineComponent({
setup() {
const router = useRouter();
const { combinedCampaigns } = useCampaign();
const goToLink = (link: string): void => {
window.open(link, '_blank');
};
const goDappPageLink = (address: string | undefined): void => {
const base = networkParam + Path.DappStaking + Path.Dapp;
const url = `${base}?dapp=${address?.toLowerCase()}`;
Expand All @@ -53,7 +54,7 @@ export default defineComponent({
return {
modules: [Autoplay],
combinedCampaigns,
goToLink,
navigateInNewTab,
goDappPageLink,
};
},
Expand All @@ -68,6 +69,7 @@ export default defineComponent({
}
.swiper {
overflow: hidden;
z-index: 0;
}
.card--swiper {
border: solid 1px $gray-2;
Expand Down
3 changes: 2 additions & 1 deletion src/components/common/Notification/NotificationBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import { AlertType } from 'src/store/general/state';
import { useI18n } from 'vue-i18n';
import { defineComponent, toRefs, PropType, computed, ref } from 'vue';
import { AlertMsg } from 'src/modules/toast';
import { navigateInNewTab } from 'src/util-general';

export default defineComponent({
name: 'NotificationBar',
Expand Down Expand Up @@ -92,7 +93,7 @@ export default defineComponent({
const isCopiedType = computed<boolean>(() => props.alertType === AlertType.Copied);

const goToSubscan = (): void => {
window.open(props.explorerUrl, '_blank');
navigateInNewTab(props.explorerUrl);
};

return {
Expand Down
79 changes: 79 additions & 0 deletions src/components/header/SnapDeprecatedBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<template>
<div v-if="isSnap" class="banner">
<div class="row--banner">
<span class="text--deprecated">{{ $t('common.snapDeprecated') }}</span>
<a :href="docsUrl.availableWallets" target="_blank" class="banner__link" rel="noreferrer">
<b>{{ $t('common.availableWallet') }}</b>
</a>
</div>
</div>
</template>

<script lang="ts">
import { computed, defineComponent, ref, watch } from 'vue';
import { docsUrl } from 'src/links';
import { useStore } from 'src/store';
import { getSelectedAccount } from 'src/hooks/helper/wallet';
import { SupportWallet } from 'src/config/wallets';
import { useAccount } from 'src/hooks';

export default defineComponent({
setup() {
const store = useStore();
const isSnap = ref<boolean>(false);
const { currentAccount, substrateAccounts } = useAccount();

watch(
[substrateAccounts, currentAccount],
() => {
const selectedWallet = getSelectedAccount(substrateAccounts.value);
isSnap.value = selectedWallet?.source === SupportWallet.Snap;
},
{ immediate: false }
);

return { docsUrl, isSnap };
},
});
</script>

<style lang="scss" scoped>
@import 'src/css/quasar.variables.scss';

.banner {
background: linear-gradient(270deg, #ff94cd 26.04%, #e6007a 100%);
color: $gray-2;
font-weight: 600;
padding: 4px 8px 8px 8px;
font-size: 12px;
position: relative;
z-index: 2;
display: flex;
align-items: center;

@media (min-width: $sm) {
font-size: 14px;
padding: 4px 16px 8px 16px;
}
}

.row--banner {
font-weight: 800;
padding: 3px 9px;
border-radius: 4px;
margin-right: 4px;

@media (min-width: $sm) {
margin-right: 8px;
}
}

.text--deprecated {
margin-right: 4px;
}

.banner__link {
color: blue;
text-decoration: underline;
}
</style>
10 changes: 0 additions & 10 deletions src/components/header/mobile/AstarDomains.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ export default defineComponent({
img: icon_img.home,
link: 'https://astar.network/',
},
{
title: 'Astar 2.0',
img: icon_img.astar2,
link: 'https://astar.network/astar2',
},
{
title: 'Tech Stack',
img: icon_img.tech_stack,
link: 'https://astar.network/developers/techstack',
},
{
title: 'Astar Docs',
img: icon_img.docs,
Expand Down
9 changes: 3 additions & 6 deletions src/components/header/mobile/BlogPosts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
v-for="(t, index) in items"
:key="index"
class="card--blog-post"
@click="goToLink(t.link)"
@click="navigateInNewTab(t.link)"
>
<img :src="t.img" :alt="t.title" />
</div>
Expand All @@ -16,6 +16,7 @@
import { defineComponent, ref, watch } from 'vue';
import { useQuery } from '@vue/apollo-composable';
import gql from 'graphql-tag';
import { navigateInNewTab } from 'src/util-general';

interface Data {
img: string;
Expand Down Expand Up @@ -55,13 +56,9 @@ export default defineComponent({
{ immediate: true }
);

const goToLink = (link: string): void => {
window.open(link, '_blank');
};

return {
items,
goToLink,
navigateInNewTab,
};
},
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/header/styles/modal-network-wallet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}

.card--astar {
width: 212px;
width: 100%;
height: 140px;
border-radius: 16px;
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.08);
Expand All @@ -62,7 +62,7 @@

.line--bottom-bg {
position: absolute;
width: 95%;
width: 98%;
height: 5px;
border-radius: 0 0 16px 16px / 0 0 6px 6px;
bottom: 0;
Expand Down
3 changes: 2 additions & 1 deletion src/components/sidenav/SidebarOption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ import { useStore } from 'src/store';
import { socialUrl, docsUrl } from 'src/links';
import { CultureCode, languagesSelector } from 'src/i18n';
import { i18n } from 'src/boot/i18n';
import { navigateInNewTab } from 'src/util-general';

export default defineComponent({
components: {
Expand All @@ -199,7 +200,7 @@ export default defineComponent({

const selectLinkIdx = ref(-1);
const goLink = (url: string) => {
window.open(url, '_blank');
navigateInNewTab(url);
};

const goToLink = (linkIdx: number) => {
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export enum HttpCodes {
NotFound = 404,
}

export const ORIGINAL_BLOCK_TIME = 12;
export const ORIGINAL_BLOCK_TIME = 6;

export const PERIOD1_START_BLOCKS = new Map<string, number>([
['astar', 5514935],
Expand Down
7 changes: 6 additions & 1 deletion src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ export default {
loading: 'Loading...',
comingSoon: 'Coming soon',
checkHowToSolve: 'Check how to solve this problem',
snapDeprecated:
'⚠️ Important: Astar Snap is being deprecated soon. Make sure to migrate your assets to a supported wallet to keep them accessible.',
availableWallet: 'You can find available wallet options in our documentation.',
speed: {
speed: 'Transaction speed',
speedTip: 'Transaction speed (Tip)',
Expand Down Expand Up @@ -473,6 +476,7 @@ export default {
switching: 'Switching to',
willBeBack: 'We will be back',
verySoon: 'very soon',
visitLater: 'Please visit the page later.',
},
},
assets: {
Expand Down Expand Up @@ -731,6 +735,7 @@ export default {
portalIpfs: 'Portal is now on IPFS!',
astarHome: 'Astar Home',
astarDocs: 'Astar Docs',
goToAssets: 'Go to Assets Page',
},
disclaimer: {
disclaimer: 'Disclaimer',
Expand Down Expand Up @@ -763,7 +768,7 @@ export default {
noDappSelected: 'No dApp selected.',
stakerRewardsExpired: 'Staker rewards expired.',
dappStaking: {
Disabled: 'Pallet is disabled/in maintenance mode.',
Disabled: 'dApp staking is currently in maintenance mode.',
NoExpiredEntries: 'There are no expired entries to clean up.',
NoStakingInfo: 'Account has no staking information for the contract',
NotOperatedDApp: 'dApp is part of dApp staking but is not active anymore.',
Expand Down
4 changes: 3 additions & 1 deletion src/layouts/DashboardLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<div class="wrapper--dashboard-layout__inner">
<portal-header />
<!-- <under-maintenance-banner /> -->
<snap-deprecated-banner />
<dapp-staking-banner />
<main id="assets-top" class="wrapper--main">
<div class="wrapper--components">
<div class="page-bg" :style="{ backgroundImage: `url(${bg})` }" />

<slot />
</div>
</main>
Expand All @@ -28,12 +28,14 @@ import { LOCAL_STORAGE } from 'src/config/localStorage';
import { useStore } from 'src/store';
import UnderMaintenanceBanner from 'src/components/header/UnderMaintenanceBanner.vue';
import DappStakingBanner from 'src/components/header/DappStakingBanner.vue';
import SnapDeprecatedBanner from 'src/components/header/SnapDeprecatedBanner.vue';

export default defineComponent({
components: {
PortalHeader,
SidebarDesktop,
DappStakingBanner,
SnapDeprecatedBanner,
},
setup() {
const store = useStore();
Expand Down
1 change: 1 addition & 0 deletions src/links/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const docsUrl = {
dappStakingForStakers: 'https://docs.astar.network/docs/use/dapp-staking/for-stakers/',
dappStakingStaked16Dapps:
'https://docs.astar.network/docs/learn/dapp-staking/dapp-staking-faq/#q-ive-staked-16-dapps-and-now-i-cant-add-or-move-tokens-and-im-getting-an-error-what-should-i-do',
availableWallets: 'https://docs.astar.network/docs/use/get-started/',
};

export const socialUrl = {
Expand Down
7 changes: 2 additions & 5 deletions src/modules/xcm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ export let xcmChainObj: XcmChainObj = {
img: require('/src/assets/img/token/pha.png'),
parachainId: parachainIds.PHALA,
endpoints: [
'wss://api.phala.network/ws',
'wss://phala-rpc.dwellir.com',
'wss://phala.api.onfinality.io/public-ws',
'wss://rpc.helikon.io/phala',
],
subscan: 'https://phala.subscan.io',
isAstarNativeToken: true,
Expand All @@ -298,10 +298,7 @@ export let xcmChainObj: XcmChainObj = {
relayChain: Chain.POLKADOT,
img: require('/src/assets/img/token/bnc.svg'),
parachainId: parachainIds.BIFROST_POLKADOT,
endpoints: [
'wss://hk.p.bifrost-rpc.liebi.com/ws',
'wss://bifrost-polkadot.api.onfinality.io/public-ws',
],
endpoints: ['wss://hk.p.bifrost-rpc.liebi.com/ws'],
chopsticksEndpoint: 'ws://localhost:9947',
subscan: 'https://bifrost.subscan.io',
isAstarNativeToken: true,
Expand Down
6 changes: 3 additions & 3 deletions src/modules/xcm/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const xcmToken = {
logo: require('/src/assets/img/token/bnc.svg'),
isXcmCompatible: true,
originChain: Chain.BIFROST_POLKADOT,
minBridgeAmount: '0.1',
minBridgeAmount: '0.5',
},
{
symbol: 'vDOT',
Expand Down Expand Up @@ -153,7 +153,7 @@ export const xcmToken = {
logo: require('/src/assets/img/token/vastr.png'),
isXcmCompatible: true,
originChain: Chain.BIFROST_POLKADOT,
minBridgeAmount: '0.1',
minBridgeAmount: '5',
},
{
symbol: 'PINK',
Expand Down Expand Up @@ -316,7 +316,7 @@ export const xcmToken = {
logo: require('/src/assets/img/token/bnc.svg'),
isXcmCompatible: true,
originChain: Chain.BIFROST_KUSAMA,
minBridgeAmount: '0.1',
minBridgeAmount: '0.5',
},
{
symbol: 'vKSM',
Expand Down
Loading
Loading