Skip to content

Commit

Permalink
chore: change menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashmod committed Nov 3, 2023
1 parent 706f8c2 commit 58da8d1
Show file tree
Hide file tree
Showing 6 changed files with 225 additions and 103 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-polyfill-node": "^0.11.0",
"rollup-plugin-visualizer": "^5.8.3",
"stylelint": "^14.14.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint": "^15.3.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^29.0.0",
"stylelint-config-tailwindcss": "^0.0.7",
Expand Down
8 changes: 2 additions & 6 deletions src/components/navs/AppNav/AppNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,8 @@ onUnmounted(() => {

<template>
<AppNavAlert v-if="currentAlert" :alert="currentAlert" />
<nav
id="app-nav"
ref="appNav"
class="xl:container sticky top-0 lg:px-6 pr-1 pl-4 mx-auto h-20"
>
<div class="flex justify-between items-center h-full">
<nav id="app-nav" ref="appNav" class="sticky top-0 lg:px-6 pr-1 pl-4 h-20">
<div class="xl:container flex justify-between items-center mx-auto h-full">
<div class="flex items-center h-full">
<router-link
:to="{ name: 'home', params: { networkSlug } }"
Expand Down
12 changes: 5 additions & 7 deletions src/components/navs/AppNav/AppNavActions.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<script lang="ts" setup>
import { computed } from 'vue';
import DarkModeToggle from '@/components/btns/DarkModeToggle.vue';
import useBreakpoints from '@/composables/useBreakpoints';
import { useSidebar } from '@/composables/useSidebar';
import useWeb3 from '@/services/web3/useWeb3';
import { Goals, trackGoal } from '@/composables/useFathom';
import AppNavAccountBtn from './AppNavAccountBtn.vue';
import AppNavActivityBtn from './AppNavActivityBtn/AppNavActivityBtn.vue';
import AppNavNetworkSelect from './AppNavNetworkSelect.vue';
import { Goals, trackGoal } from '@/composables/useFathom';
/**
* COMPOSABLES
*/
const { isMobile, isDesktop } = useBreakpoints();
const { isMobile } = useBreakpoints();
const { account, connector, startConnectWithInjectedProvider } = useWeb3();
const { setSidebarOpen } = useSidebar();
Expand All @@ -34,8 +32,9 @@ function connectWalletHandler() {

<template>
<div class="grid grid-rows-1 grid-flow-col gap-2">
<DarkModeToggle v-if="isDesktop" />
<AppNavActivityBtn v-if="account" />
<!-- <DarkModeToggle v-if="isDesktop" />
<AppNavActivityBtn v-if="account" /> -->
<AppNavNetworkSelect v-if="!hideNetworkSelect" />
<AppNavAccountBtn v-if="account" />
<BalBtn
v-else
Expand All @@ -47,7 +46,6 @@ function connectWalletHandler() {
<span class="hidden lg:inline-block" v-text="$t('connectWallet')" />
<span class="lg:hidden" v-text="$t('connect')" />
</BalBtn>
<AppNavNetworkSelect v-if="!hideNetworkSelect" />
<BalBtn
v-if="isMobile"
color="white"
Expand Down
30 changes: 23 additions & 7 deletions src/components/navs/AppNav/DesktopLinks/DesktopLinks.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { Goals, trackGoal } from '@/composables/useFathom';
import useNetwork from '@/composables/useNetwork';
import { useRoute } from 'vue-router';
import DesktopLinkItem from './DesktopLinkItem.vue';
import useNetwork, { isTestnet } from '@/composables/useNetwork';
import { Goals, trackGoal } from '@/composables/useFathom';
/**
* COMPOSABLES
Expand All @@ -21,6 +21,14 @@ function isActive(page: string): boolean {

<template>
<div class="desktop-links">
<DesktopLinkItem
:to="{ name: 'swap', params: { networkSlug } }"
:active="isActive('swap')"
prefetch
@click="trackGoal(Goals.ClickNavSwap)"
>
{{ $t('swap') }}
</DesktopLinkItem>
<DesktopLinkItem
:to="{ name: 'home', params: { networkSlug } }"
:active="isActive('home')"
Expand All @@ -30,14 +38,22 @@ function isActive(page: string): boolean {
{{ $t('pool') }}
</DesktopLinkItem>
<DesktopLinkItem
:to="{ name: 'swap', params: { networkSlug } }"
:active="isActive('swap')"
:to="{ name: 'home', params: { networkSlug } }"
:active="isActive('home')"
prefetch
@click="trackGoal(Goals.ClickNavSwap)"
@click="trackGoal(Goals.ClickNavPools)"
>
{{ $t('swap') }}
{{ $t('vote') }}
</DesktopLinkItem>
<DesktopLinkItem
:to="{ name: 'home', params: { networkSlug } }"
:active="isActive('home')"
prefetch
@click="trackGoal(Goals.ClickNavPools)"
>
{{ $t('dashboard') }}
</DesktopLinkItem>
<!-- <DesktopLinkItem
:to="{ name: 'claim', params: { networkSlug } }"
:active="isActive('claim')"
prefetch
Expand Down Expand Up @@ -69,7 +85,7 @@ function isActive(page: string): boolean {
@click="trackGoal(Goals.ClickNavVebal)"
>
veBAL
</DesktopLinkItem>
</DesktopLinkItem> -->
</div>
</template>

Expand Down
1 change: 1 addition & 0 deletions src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@
"dark": "Dark",
"date": "Date",
"day": "day",
"dashboard": "Dashboard",
"defiLiquidityPools": "DeFi liquidity pools",
"delegateFeesTooltip": "Liquidity providers in this pool earn fixed swap fees on every swap utilizing the liquidity in this pool. Control has been delegated to the community, so fees could change in the future if this pool becomes actively managed.",
"depositing": "depositing",
Expand Down
Loading

0 comments on commit 58da8d1

Please sign in to comment.