From 519e449fe48a325c425aaa2c5196bf9a5e072020 Mon Sep 17 00:00:00 2001 From: Saeid Doroudi Date: Sat, 18 Jan 2025 10:44:12 +0330 Subject: [PATCH] Improve dark mode Fixes #97 --- src/App.vue | 5 +++-- src/common/theme/theme-overrides.ts | 15 ++++++++++++++ src/components.d.ts | 4 +++- src/components/DonutChart.vue | 7 +++---- src/components/Sidebar.vue | 1 + src/styles/utils/_override.scss | 31 +++++++++++++++++++++++------ 6 files changed, 50 insertions(+), 13 deletions(-) diff --git a/src/App.vue b/src/App.vue index 2c0dcd0..05c5b95 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,7 +11,7 @@ import { drawerRtl } from 'naive-ui/es/drawer/styles' import { darkTheme, lightTheme } from 'naive-ui' import useColors from './composables/colors' -import themeOverrides from '~/common/theme/theme-overrides' +import themeOverrides, { darkThemeOverrides } from '~/common/theme/theme-overrides' const layout = useLayoutStore() @@ -29,6 +29,7 @@ const rtlStyles = [ ] const customTheme = ref({ ...themeOverrides }) +const customDarkTheme = ref({ ...themeOverrides, ...darkThemeOverrides }) const { makeLighter } = useColors() watch(() => layout.activeLanguage, () => { @@ -61,7 +62,7 @@ watch(() => layout.themeColor, (newValue) => {