aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/App.vue15
-rw-r--r--src/themes.ts25
2 files changed, 35 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>
diff --git a/src/themes.ts b/src/themes.ts
new file mode 100644
index 0000000..705b520
--- /dev/null
+++ b/src/themes.ts
@@ -0,0 +1,25 @@
+import type { GlobalThemeOverrides } from 'naive-ui';
+
+export const lightThemeOverrides: GlobalThemeOverrides = {
+ Layout: { color: '#f1f5f9' },
+};
+
+export const darkThemeOverrides: GlobalThemeOverrides = {
+ common: {
+ primaryColor: '#1ea54cFF',
+ primaryColorHover: '#36AD6AFF',
+ primaryColorPressed: '#0C7A43FF',
+ primaryColorSuppl: '#36AD6AFF',
+ },
+
+ Layout: {
+ color: '#121212',
+ siderColor: '#1e1e1e',
+ siderBorderColor: 'transparent',
+ },
+
+ Card: {
+ color: '#1e1e1e',
+ borderColor: 'transparent',
+ },
+};