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

Feature/replace lfgm #1428

Merged
merged 9 commits into from
Dec 18, 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
Binary file added src/assets/img/surge_token.webp
Binary file not shown.
22 changes: 13 additions & 9 deletions src/components/header/mobile/MobileNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
$t('sidenavi.governance')
}}</a>
</nav>
<a class="surge-mobile" :href="surgeUrl" target="_blank">
<img :src="require('src/assets/img/surge_token.webp')" alt="Surge" />
</a>

<div class="gradient-bg">
<astar-domains />
<!-- <blog-posts /> -->
Expand Down Expand Up @@ -90,18 +94,18 @@
</template>

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

export default defineComponent({
components: { AstarDomains, CommunityLinks, LocaleChanger, LightDarkMode },
Expand All @@ -125,6 +129,7 @@ export default defineComponent({
RoutePath,
network,
isZkyoto,
surgeUrl,
socialUrl,
isGovernanceEnabled,
governanceUrl,
Expand Down Expand Up @@ -215,14 +220,13 @@ export default defineComponent({
padding: 0 16px;
}

.lfgm-mobile {
.surge-mobile {
display: flex;
justify-content: center;
margin: 40px 0px;
img {
width: 100%;
height: 150px;
background: $navy-3;
max-width: 150px;
}
}
</style>
25 changes: 17 additions & 8 deletions src/components/sidenav/SidebarDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
</div>
</a>
</div>
<div>
<a class="surge" :href="surgeUrl" target="_blank">
<img :src="require('src/assets/img/surge_token.webp')" alt="Surge" />
</a>
<q-tooltip>
<span class="text--tooltip">{{ $t('joinSurge') }}</span>
</q-tooltip>
</div>
<div class="menu__indicator" :class="getIndicatorClass(path)" />
</nav>

Expand All @@ -98,16 +106,16 @@
</template>

<script lang="ts">
import { defineComponent, ref, computed } from 'vue';
import { useStore } from 'src/store';
import { useGovernance, useNetworkInfo, useSidebar } from 'src/hooks';
import { providerEndpoints } from 'src/config/chainEndpoints';
import Logo from '../common/Logo.vue';
import { useRouter } from 'vue-router';
import { useGovernance, useNetworkInfo, useSidebar } from 'src/hooks';
import { socialUrl, surgeUrl } from 'src/links';
import { Path as RoutePath } from 'src/router/routes';
import IconEcosystem from './components/IconEcosystem.vue';
import { useStore } from 'src/store';
import { computed, defineComponent, ref } from 'vue';
import { useRouter } from 'vue-router';
import Logo from '../common/Logo.vue';
import SidebarOptionDesktop from './SidebarOptionDesktop.vue';
import { socialUrl } from 'src/links';
import IconEcosystem from './components/IconEcosystem.vue';

export default defineComponent({
components: {
Expand All @@ -129,7 +137,7 @@ export default defineComponent({
const path = computed(() => router.currentRoute.value.path.split('/')[2]);

const getIndicatorClass = (path: string): string => {
let indicatorClassObject: Record<string, string> = {
const indicatorClassObject: Record<string, string> = {
dashboard: 'menu__dashboard',
assets: 'menu__assets',
'dapp-staking': 'menu__staking',
Expand All @@ -155,6 +163,7 @@ export default defineComponent({
RoutePath,
socialUrl,
isZkyoto,
surgeUrl,
isGovernanceEnabled,
governanceUrl,
};
Expand Down
39 changes: 28 additions & 11 deletions src/components/sidenav/styles/sidebar-desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,34 +97,32 @@
}

.menu__assets {
margin-top: calc(-276px);

margin-top: calc(-276px - 158px);
&.governance_activated {
margin-top: calc(-276px - 46px);
margin-top: calc(-276px - 158px - 46px);

}
}

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

margin-top: calc(-230px - 158px);
&.governance_activated {
margin-top: calc(-230px - 46px);
margin-top: calc(-230px - 158px - 46px);
}
}

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

margin-top: calc(-184px - 158px);
&.governance_activated {
margin-top: calc(-184px - 46px);
margin-top: calc(-184px - 158px - 46px);
}
}

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

&.governance_activated {
margin-top: calc(-138px - 46px);
margin-top: calc(-138px - 158px - 46px);
}
}

Expand All @@ -150,3 +148,22 @@
background: transparent;
}
}

.surge {
display: flex;
justify-content: center;
margin-bottom: 8px;
color: #fff;
position: relative;
transition: all 0.3s ease 0s;
img {
margin: 25px 0;
width: 100px;
height: 100px;
}
}

.surge:hover {
background: black;
}

1 change: 1 addition & 0 deletions src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default {
help: 'Help',
share: 'Share',
multisig: 'Multisig',
joinSurge: 'Join Astar Surge',
sort: {
sortBy: 'Sort by',
amountHightToLow: 'Amount: High to Low',
Expand Down
4 changes: 3 additions & 1 deletion src/links/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { endpointKey, providerEndpoints } from 'src/config/chainEndpoints';
import { blockExplorerUrls } from 'src/config/web3';
import Web3 from 'web3';
import type Web3 from 'web3';

export const docsUrl = {
topPage: 'https://docs.astar.network',
Expand Down Expand Up @@ -53,6 +53,8 @@ export const polkadotJsUrl = {
},
};

export const surgeUrl = 'https://surge.sakefinance.com/';

export const ccipExplorerUrl = 'https://ccip.chain.link';

export const getSubscanExtrinsic = ({
Expand Down
Loading