Skip to content

Commit

Permalink
Release hotfix to main (#1407)
Browse files Browse the repository at this point in the history
* Adding LFGM campaign (#1397)

* add lfgm link to links

* add lfgm asset

* add lfgm image to desktop sidebar

* add lfgm image to mobile nav

* add target as block to open new window

* hide blog section (#1399)

* hide blog section

* add forum to mobile nav

* Remove leaderboard for voting period (#1403)

* Remove leaderboard for voting period

* Added empty div instead voting leaderboard to preserve vertical spacing

* Delete Neurolanche from dapp_promotions.json (#1405)

* Delete Neurolanche from dapp_promotions.json

* Delete public/images/dapp_promotions/neurolanche.jpeg

* Remove staked contracts check (#1400)

* Startale link fix (#1408)

* add governance link to mobile nav (#1409)

---------

Co-authored-by: Taegeon Alan Go <[email protected]>
Co-authored-by: Neurolanche X Labs <[email protected]>
  • Loading branch information
3 people authored Oct 28, 2024
1 parent db3f3e8 commit 372eafe
Show file tree
Hide file tree
Showing 10 changed files with 346 additions and 35 deletions.
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.
41 changes: 33 additions & 8 deletions src/components/header/mobile/MobileNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,21 @@
<span class="text--link">{{ $t('sidenavi.data') }}</span>
</div>
</router-link>
<a href="" target="_blank">{{ $t('sidenavi.governance') }}</a>
<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>
<a v-if="isGovernanceEnabled" :href="governanceUrl" target="_blank">{{
$t('sidenavi.governance')
}}</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 @@ -85,26 +94,27 @@

<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, useGovernance } 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);
const router = useRouter();
const path = computed(() => router.currentRoute.value.path.split('/')[2]);
const { isZkyoto } = useNetworkInfo();
const { isGovernanceEnabled, governanceUrl } = useGovernance();
const store = useStore();
const currentNetworkIdx = computed(() => store.getters['general/networkIdx']);
Expand All @@ -118,6 +128,10 @@ export default defineComponent({
RoutePath,
network,
isZkyoto,
lfgmUrl,
socialUrl,
isGovernanceEnabled,
governanceUrl,
};
},
});
Expand Down Expand Up @@ -204,4 +218,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 @@ -88,6 +88,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 @@ -107,7 +110,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 @@ -153,6 +156,7 @@ export default defineComponent({
RoutePath,
socialUrl,
isZkyoto,
lfgmUrl,
isGovernanceEnabled,
governanceUrl,
};
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 @@ -29,12 +29,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 @@ -764,7 +764,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

0 comments on commit 372eafe

Please sign in to comment.