aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-04 14:07:24 +0200
committerGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-04 14:07:24 +0200
commitd542688664cc9c675d1d26f4278a25f1b9e3f28d (patch)
tree941ec240a5761082583500742d7ec99d471f2677 /src/App.vue
parent3e92b7f1e04a709df231fce22801b55619e8faab (diff)
downloadit-tools-d542688664cc9c675d1d26f4278a25f1b9e3f28d.tar.gz
it-tools-d542688664cc9c675d1d26f4278a25f1b9e3f28d.tar.zst
it-tools-d542688664cc9c675d1d26f4278a25f1b9e3f28d.zip
feat(style): theme overrides
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/App.vue b/src/App.vue
index 14139b3..c58a0ad 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,7 +3,8 @@ import { RouterView } from 'vue-router'
import { layouts } from './layouts';
import { computed } from 'vue';
import { useRoute } from 'vue-router'
-
+import { darkThemeOverrides, lightThemeOverrides } from './themes'
+import { NThemeEditor } from 'naive-ui'; // TODO: remove before mep
import {
darkTheme,
NConfigProvider,
@@ -16,15 +17,19 @@ const layout = computed(() => route?.meta?.layout ?? layouts.base)
const styleStore = useStyleStore()
const theme = computed(() => styleStore.isDarkTheme ? darkTheme : null)
+const themeOverrides = computed(() => styleStore.isDarkTheme ? darkThemeOverrides : lightThemeOverrides)
</script>
<template>
- <n-config-provider :theme="theme">
+ <n-config-provider :theme="theme" :theme-overrides="themeOverrides">
<n-global-style />
<n-message-provider placement="bottom">
- <component :is="layout">
- <router-view />
- </component>
+ <n-theme-editor>
+ <!-- TODO: remove before mep -->
+ <component :is="layout">
+ <router-view />
+ </component>
+ </n-theme-editor>
</n-message-provider>
</n-config-provider>
</template>