diff --git a/src/components/NavbarButtons.vue b/src/components/NavbarButtons.vue
index 339495df..5b1a3a4e 100644
--- a/src/components/NavbarButtons.vue
+++ b/src/components/NavbarButtons.vue
@@ -1,17 +1,9 @@
@@ -57,7 +49,7 @@ function toggleDarkTheme() {
-
+ styleStore.toggleDark()">
diff --git a/src/ui/theme/theme.models.ts b/src/ui/theme/theme.models.ts
index 850afe95..5ab78d79 100644
--- a/src/ui/theme/theme.models.ts
+++ b/src/ui/theme/theme.models.ts
@@ -1,4 +1,4 @@
-import { useThemeStore } from './theme.store';
+import { useStyleStore } from '@/stores/style.store';
export { defineThemes };
@@ -6,8 +6,8 @@ function defineThemes(themes: { light: Theme; dark: Theme }) {
return {
themes,
useTheme() {
- const themeStore = useThemeStore();
- return computed(() => themes[themeStore.themeType]);
+ const styleStore = useStyleStore();
+ return computed(() => themes[styleStore.isDarkTheme ? 'dark' : 'light']);
},
};
}
diff --git a/src/ui/theme/theme.store.ts b/src/ui/theme/theme.store.ts
deleted file mode 100644
index 04d34945..00000000
--- a/src/ui/theme/theme.store.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { defineStore } from 'pinia';
-import { useStyleStore } from '@/stores/style.store';
-
-export const useThemeStore = defineStore('ui-theme', {
- state: () => {
- const styleStore = useStyleStore();
- return {
- themeType: styleStore.isDarkTheme ? 'dark' : 'light',
- };
- },
- getters: {
- isDarkTheme(): boolean {
- return this.themeType === 'dark';
- },
- isLightTheme(): boolean {
- return this.themeType === 'light';
- },
- },
- actions: {
- toggleTheme() {
- this.themeType = this.isDarkTheme ? 'light' : 'dark';
- },
- },
-});