Skip to content

Commit

Permalink
fix: respect darkModeToggle config in search dialog
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Nov 16, 2024
1 parent da62392 commit 78d60e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/layout/SearchDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</UiCommandGroup>
<UiCommandSeparator v-if="item.children" />
</template>
<UiCommandGroup heading="Theme" class="p-1.5">
<UiCommandGroup v-if="darkModeToggle" heading="Theme" class="p-1.5">
<UiCommandItem value="light" @click="colorMode.preference = 'light'">
<Icon name="lucide:sun" class="mr-2 size-4" />
<span>Light</span>
Expand Down Expand Up @@ -81,6 +81,8 @@
<script setup lang="ts">
import { VisuallyHidden } from 'radix-vue';
const { darkModeToggle } = useConfig().value.header;
const open = defineModel<boolean>('open');
const colorMode = useColorMode();
const { placeholderDetailed } = useConfig().value.search;
Expand Down

0 comments on commit 78d60e9

Please sign in to comment.