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

Release hotfix to main #1407

Merged
merged 8 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
Binary file removed public/images/dapp_promotions/neurolanche.jpeg
Binary file not shown.
268 changes: 268 additions & 0 deletions src/assets/img/lfgm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 27 additions & 7 deletions src/components/header/mobile/MobileNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,18 @@
<span class="text--link">{{ $t('sidenavi.data') }}</span>
</div>
</router-link>
<a :href="socialUrl.forum" :class="['link']" target="_blank" @click="showNav = !showNav">
<div class="column--item column--item--dashboard">
<span class="text--link">{{ $t('sidenavi.forum') }}</span>
</div>
</a>
</nav>

<a class="lfgm-mobile" :href="lfgmUrl" target="_blank">
<img :src="require('src/assets/img/lfgm.svg')" alt="LFGM" />
</a>
<div class="gradient-bg">
<astar-domains />
<blog-posts />
<!-- <blog-posts /> -->
</div>

<div class="gradient-bg">
Expand Down Expand Up @@ -84,20 +91,20 @@

<script lang="ts">
import { defineComponent, ref, computed } from 'vue';
import { useBreakpoints } from 'src/hooks';
import { Path as RoutePath } from 'src/router/routes';
import { useRouter } from 'vue-router';
import { useNetworkInfo } from 'src/hooks';
import { useBreakpoints, useNetworkInfo } from 'src/hooks';
import { Path as RoutePath } from 'src/router/routes';
import { lfgmUrl, socialUrl } from 'src/links';
import { useStore } from 'src/store';
import { providerEndpoints } from 'src/config/chainEndpoints';
import AstarDomains from './AstarDomains.vue';
import CommunityLinks from './CommunityLinks.vue';
import BlogPosts from './BlogPosts.vue';
// import BlogPosts from './BlogPosts.vue';
import LocaleChanger from './LocaleChanger.vue';
import LightDarkMode from './LightDarkMode.vue';

export default defineComponent({
components: { AstarDomains, CommunityLinks, BlogPosts, LocaleChanger, LightDarkMode },
components: { AstarDomains, CommunityLinks, LocaleChanger, LightDarkMode },
setup() {
const { width, screenSize } = useBreakpoints();
const showNav = ref<boolean>(false);
Expand All @@ -117,6 +124,8 @@ export default defineComponent({
RoutePath,
network,
isZkyoto,
lfgmUrl,
socialUrl,
};
},
});
Expand Down Expand Up @@ -203,4 +212,15 @@ export default defineComponent({
gap: 16px;
padding: 0 16px;
}

.lfgm-mobile {
display: flex;
justify-content: center;
margin: 40px 0px;
img {
width: 100%;
height: 150px;
background: $navy-3;
}
}
</style>
6 changes: 5 additions & 1 deletion src/components/sidenav/SidebarDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
</div>
</a>
</div>
<a class="lfgm" :href="lfgmUrl" target="_blank">
<img :src="require('src/assets/img/lfgm.svg')" alt="LFGM" />
</a>
<div class="menu__indicator" :class="getIndicatorClass(path)" />
</nav>

Expand All @@ -115,7 +118,7 @@ import { useRouter } from 'vue-router';
import { Path as RoutePath } from 'src/router/routes';
import IconEcosystem from './components/IconEcosystem.vue';
import SidebarOptionDesktop from './SidebarOptionDesktop.vue';
import { socialUrl } from 'src/links';
import { socialUrl, lfgmUrl } from 'src/links';

export default defineComponent({
components: {
Expand Down Expand Up @@ -162,6 +165,7 @@ export default defineComponent({
RoutePath,
socialUrl,
isZkyoto,
lfgmUrl,
};
},
});
Expand Down
26 changes: 21 additions & 5 deletions src/components/sidenav/styles/sidebar-desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
.menu {
position: relative;
margin-top: rem(32);
margin-left: 24px;
flex-grow: 1;

.row--item {
Expand All @@ -58,6 +57,7 @@
height: 38px;
padding: 8px;
margin-bottom: 8px;
margin-left: 24px;
border-radius: 6px;
color: #fff;
position: relative;
Expand Down Expand Up @@ -93,22 +93,24 @@
border-radius: 6px;
height: 38px;
width: 176px;
margin-left: 24px;
}

// adding -120px to the margin-top to adjust the position because of the lgfm logo
.menu__assets {
margin-top: -276px;
margin-top: calc(-276px - 120px);
}

.menu__dashboard {
margin-top: -230px;
margin-top: calc(-230px - 120px);
}

.menu__staking {
margin-top: -184px;
margin-top: calc(-184px - 120px);
}

.menu__bridge {
margin-top: -138px;
margin-top: calc(-138px - 120px);
}

.dummy-row {
Expand All @@ -133,3 +135,17 @@
background: transparent;
}
}

.lfgm {
display: flex;
align-items: center;
width: 224px;
height: 112px;
margin-bottom: 8px;
color: #fff;
position: relative;
transition: all 0.3s ease 0s;
}
.lfgm:hover {
background: $navy-3;
}
6 changes: 0 additions & 6 deletions src/data/dapp_promotions.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
"link": "https://portal.astar.network/astar/dapp-staking/dapp?dapp=zsv1gvepvmwfdshmwgczs4zyvmmwesbjwqjn4wdpuefrrpy",
"img": "images/dapp_promotions/lucky.png"
},
{
"name": "Neurolanche - Stake & Earn",
"shortDescription": "Join our staking and earn soulbound 'Rewarding' NFT.",
"link": "https://twitter.com/neurolanche/status/1722222206204399642?s=52&t=ISh07fvjMqpmUg40w5HqBg/",
"img": "images/dapp_promotions/neurolanche.jpeg"
},
{
"name": "apeXchimpz (AXC)",
"shortDescription": "Stake for FREE #modularNFTs, guaranteed! We take NFTs further...",
Expand Down
1 change: 0 additions & 1 deletion src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ export default {
NotOperatedDApp: 'dApp is part of dApp staking but is not active anymore.',
PeriodEndsNextEra:
'Period ends in the next era. It is not possible to stake in the last era of a period.',
TooManyStakedContracts: 'There are too many contract stake entries for the account.',
TooManyUnlockingChunks:
'Contract has too many unlocking chunks. Withdraw the existing chunks if possible or wait for current chunks to complete unlocking process to withdraw them.',
UnavailableStakeFunds:
Expand Down
2 changes: 2 additions & 0 deletions src/links/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export const polkadotJsUrl = {
},
};

export const lfgmUrl = 'https://lfgm.astar.network';

export const getSubscanExtrinsic = ({
subscanBase,
hash,
Expand Down
22 changes: 17 additions & 5 deletions src/staking-v3/components/DiscoverV3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<voting-wizard />
</div>
<leaderboard />
<leaderboard-vote />
<!-- <leaderboard-vote /> -->
<div v-if="isVotingPeriod" class="v-spacer"></div>
<dynamic-ads-area />

<div
Expand Down Expand Up @@ -63,7 +64,6 @@ import Dapps from './Dapps.vue';
import DynamicAdsArea from './DynamicAdsArea.vue';
import DataList from './data/DataList.vue';
import Leaderboard from './leaderboard/Leaderboard.vue';
import LeaderboardVote from './leaderboard/LeaderboardVote.vue';
import PeriodInfoVote from './PeriodInfoVote.vue';
import PeriodInfoBuild from './PeriodInfoBuild.vue';
import VotingWizard from './vote/VotingWizard.vue';
Expand All @@ -74,7 +74,6 @@ export default defineComponent({
components: {
Dapps,
Leaderboard,
LeaderboardVote,
DataList,
DynamicAdsArea,
PeriodInfoVote,
Expand All @@ -85,7 +84,7 @@ export default defineComponent({
},
setup() {
const { isZkEvm, isAstarZkEvm, currentNetworkIdx } = useNetworkInfo();
const { protocolState } = useDappStaking();
const { protocolState, isVotingPeriod } = useDappStaking();
const { t } = useI18n();
const store = useStore();

Expand Down Expand Up @@ -116,11 +115,24 @@ export default defineComponent({
{ immediate: true }
);

return { searchText, previousPeriod, displayIndex, toggleDapps };
return { searchText, previousPeriod, displayIndex, toggleDapps, isVotingPeriod };
},
});
</script>

<style lang="scss" scoped>
@use './styles/discover-v3.scss';

.v-spacer {
width: 100%;
position: relative;
background-color: $navy-1;
background-size: 100% auto;
height: 40px;
margin-bottom: 0px;

@media (min-width: $lg) {
height: 100px;
}
}
</style>
9 changes: 0 additions & 9 deletions src/staking-v3/hooks/useDappStaking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,6 @@ export function useDappStaking() {
return [false, t('stakingV3.dappStaking.WrongNetworkZkEvm'), ''];
} else if (stake.amount <= 0) {
return [false, t('stakingV3.dappStaking.ZeroAmount'), ''];
} else if (
constants.value &&
(ledger.value?.contractStakeCount ?? 0) >= constants.value.maxNumberOfStakedContracts
) {
return [
false,
t('stakingV3.dappStaking.TooManyStakedContracts'),
docsUrl.dappStakingStaked16Dapps,
];
} else if (
constants.value?.minStakeAmountToken &&
stake.amount < constants.value.minStakeAmountToken &&
Expand Down
Loading