valaxy-theme-hairy 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/App.vue +1 -1
- package/composables/dark.ts +8 -5
- package/package.json +1 -1
- package/styles/components/markdown.scss +1 -3
- package/styles/css-vars.scss +2 -0
package/App.vue
CHANGED
package/composables/dark.ts
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
import { useAppStore, useThemeConfig } from 'valaxy'
|
2
|
+
import { onMounted } from 'vue'
|
2
3
|
import { useLocalStorage } from '@vueuse/core'
|
3
4
|
import type { ThemeConfig } from 'valaxy-theme-hairy'
|
4
5
|
|
5
6
|
export function setupDefaultDark() {
|
6
7
|
const theme = useThemeConfig<ThemeConfig>()
|
7
|
-
const
|
8
|
+
const appStore = useAppStore()
|
8
9
|
const local = useLocalStorage('--hairy-mode', '')
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
onMounted(() => {
|
11
|
+
if (theme.value.theme && !local.value) {
|
12
|
+
appStore.isDark = theme.value.theme === 'dark'
|
13
|
+
local.value = theme.value.theme
|
14
|
+
}
|
15
|
+
})
|
13
16
|
}
|
package/package.json
CHANGED