Skip to content

Commit b109dbf

Browse files
committed
refactor: new command panel
1 parent 4cd0826 commit b109dbf

8 files changed

Lines changed: 1728 additions & 551 deletions

File tree

app/components/DarkToggle.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
const mode = useColorMode({
33
emitAuto: true,
44
})
5-
const { state, next } = useCycleList(['light', 'dark'] as const, { initialValue: mode })
5+
const state = computed(() => (mode.value === 'dark' ? 'dark' : 'light'))
6+
7+
function next() {
8+
mode.value = state.value === 'dark' ? 'light' : 'dark'
9+
}
610
711
watchEffect(() => {
8-
mode.value = state.value
912
if (typeof document !== 'undefined') {
1013
document
1114
.querySelector('meta[name="theme-color"]')
@@ -56,8 +59,6 @@ const icon = computed(() => {
5659
return 'i-hugeicons:moon-slow-wind'
5760
case 'light':
5861
return 'i-hugeicons:sun-03'
59-
case 'auto':
60-
return 'i-hugeicons:computer-phone-sync'
6162
default:
6263
return ''
6364
}

app/components/command/COMMAND_PALETTE.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)