Skip to content

Commit

Permalink
feat: add DarkMode Button
Browse files Browse the repository at this point in the history
  • Loading branch information
Another-DevX authored and fabianschu committed Jan 22, 2024
1 parent 33d0f0a commit dfdff85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/components/navs/AppNav/AppNavActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import useWeb3 from '@/services/web3/useWeb3';
import { Goals, trackGoal } from '@/composables/useFathom';
import AppNavAccountBtn from './AppNavAccountBtn.vue';
import AppNavNetworkSelect from './AppNavNetworkSelect.vue';
import DarkModeToggle from '@/components/btns/DarkModeToggle.vue';
/**
* COMPOSABLES
Expand All @@ -30,6 +31,7 @@ function connectWalletHandler() {

<template>
<div class="grid grid-rows-1 grid-flow-col gap-2">
<DarkModeToggle v-if="!isMobile" />
<AppNavActivityBtn v-if="account" />
<AppNavNetworkSelect v-if="!hideNetworkSelect" />
<AppNavAccountBtn v-if="account" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/navs/AppNav/AppNavNetworkSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function isActive(network: NetworkOption): boolean {
:alt="network.name"
class="mr-2 w-6 h-6 rounded-full"
/>
<span class="ml-1 font-medium">
<span class="overflow-x-hidden ml-1 max-w-full font-medium">
{{ network.name }}
</span>

Expand Down
7 changes: 4 additions & 3 deletions src/components/navs/AppNav/AppSidebar/SidebarContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Goals, trackGoal } from '@/composables/useFathom';
import useNetwork from '@/composables/useNetwork';
import { sleep } from '@/lib/utils';
import useWeb3 from '@/services/web3/useWeb3';
import useDarkMode from '@/composables/useDarkMode';
/**
* PROPS & EMITS
*/
Expand All @@ -30,6 +30,7 @@ const { networkSlug } = useNetwork();
const { t } = useI18n();
const router = useRouter();
const { openNpsModal } = useAppzi();
const { darkMode, toggleDarkMode } = useDarkMode();
/**
* STATE
Expand Down Expand Up @@ -131,13 +132,13 @@ watch(blockNumber, async () => {
}}</span>
</div>

<!-- <div class="px-4 mt-6">
<div class="px-4 mt-6">
<div class="mt-2 side-bar-btn" @click="toggleDarkMode">
<MoonIcon v-if="!darkMode" class="mr-2" />
<SunIcon v-else class="mr-2" />
<span>{{ darkMode ? 'Light' : 'Dark' }} mode</span>
</div>
</div> -->
</div>

<div class="grid grid-rows-1 grid-flow-col auto-cols-min gap-2 px-4 mt-4">
<BalLink
Expand Down

0 comments on commit dfdff85

Please sign in to comment.