🎉 Initial Commit

This commit is contained in:
2025-09-18 23:50:44 +08:00
commit 773cc220e0
15 changed files with 2681 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { useDark, useToggle } from "@vueuse/core"
// composables/useCustomTheme.ts
export function useCustomTheme(): {
isDark: WritableComputedRef<boolean, boolean>
toggle: (value?: boolean | undefined) => boolean
} {
const { $vuetify } = useNuxtApp()
const isDark = useDark({
valueDark: "dark",
valueLight: "light",
initialValue: "light",
onChanged: (dark: boolean) => {
$vuetify.theme.global.name.value = dark ? "dark" : "light"
}
})
const toggle = useToggle(isDark)
return { isDark, toggle }
}