aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-04 01:52:59 +0200
committerGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-04 01:52:59 +0200
commit3e92b7f1e04a709df231fce22801b55619e8faab (patch)
tree55e09bfee391a02eff35eaf9ada784ae4b6193c2 /src/App.vue
parente8594de7b45102b8bc1cfb82d0839e3722d9c4c2 (diff)
downloadit-tools-3e92b7f1e04a709df231fce22801b55619e8faab.tar.gz
it-tools-3e92b7f1e04a709df231fce22801b55619e8faab.tar.zst
it-tools-3e92b7f1e04a709df231fce22801b55619e8faab.zip
feat(style): dark mode
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue
index abbb362..14139b3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -5,16 +5,21 @@ import { computed } from 'vue';
import { useRoute } from 'vue-router'
import {
+ darkTheme,
NConfigProvider,
NGlobalStyle,
} from 'naive-ui'
+import { useStyleStore } from './stores/style.store';
const route = useRoute();
const layout = computed(() => route?.meta?.layout ?? layouts.base)
+const styleStore = useStyleStore()
+
+const theme = computed(() => styleStore.isDarkTheme ? darkTheme : null)
</script>
<template>
- <n-config-provider>
+ <n-config-provider :theme="theme">
<n-global-style />
<n-message-provider placement="bottom">
<component :is="layout">