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

feat: add DarkMode Button #19

Closed
wants to merge 1 commit into from
Closed
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
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
6 changes: 4 additions & 2 deletions src/components/navs/AppNav/AppSidebar/SidebarContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +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 +31,7 @@ const { networkSlug } = useNetwork();
const { t } = useI18n();
const router = useRouter();
const { openNpsModal } = useAppzi();
const { darkMode, toggleDarkMode } = useDarkMode();

/**
* STATE
Expand Down Expand Up @@ -131,13 +133,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