Skip to content

Commit

Permalink
fix: dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 11, 2021
1 parent 933592e commit 802ca86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/client/components/Graph.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { Network, Data, Options } from 'vis-network'
import type { ModuleInfo } from '../../types'
import { isDark } from '../logic'
const props = defineProps<{
modules?: ModuleInfo[]
Expand All @@ -18,6 +19,7 @@ const data = computed<Data>(() => {
label: path.split('/').splice(-1)[0],
group: path.split('/').slice(0, -1).join('/'),
size: 15 + Math.min(mod.deps.length / 2, 8),
font: { color: isDark.value ? 'white' : 'black' },
shape: mod.id.includes('/node_modules/')
? 'hexagon'
: mod.virtual
Expand Down
2 changes: 1 addition & 1 deletion src/client/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ onMounted(() => {
>
<router-link class="min-w-70px h-full" to="/"></router-link>
<div
class="bg-white h-full overflow-hidden flex-auto shadow-lg transition-transform transform duration-300"
class="bg-white dark:bg-[#111] border-main border-l h-full overflow-hidden flex-auto shadow-lg transition-transform transform duration-300"
:class="isRoot ? 'translate-x-1/2' : 'translate-x-0'"
>
<router-view v-slot="{ Component }">
Expand Down

0 comments on commit 802ca86

Please sign in to comment.