diff --git a/fyo/core/types.ts b/fyo/core/types.ts index f9c36f21..513605a5 100644 --- a/fyo/core/types.ts +++ b/fyo/core/types.ts @@ -36,7 +36,6 @@ export type ConfigMap = { lastSelectedFilePath: null | string; language: string deviceId: string - darkMode: boolean }; export interface ConfigFile { diff --git a/schemas/core/SystemSettings.json b/schemas/core/SystemSettings.json index e5570c90..50939de7 100644 --- a/schemas/core/SystemSettings.json +++ b/schemas/core/SystemSettings.json @@ -117,6 +117,14 @@ "fieldtype": "Data", "readOnly": true, "hidden": true + }, + { + "fieldname": "darkMode", + "label": "Dark mode", + "fieldtype": "Check", + "default": "false", + "description": "Sets the theme of the app.", + "section": "Theme" } ], "quickEditFields": [ @@ -126,4 +134,4 @@ "displayPrecision", "hideGetStarted" ] -} +} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index e6573329..01e5e11b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,7 +23,6 @@ class="flex-1" :darkMode="darkMode" @change-db-file="showDbSelector" - @toggle-darkmode="toggleDMode" /> { @@ -260,10 +261,6 @@ export default defineComponent({ this.searcher = null; this.companyName = ''; }, - toggleDMode(): void { - toggleDarkMode(); - this.darkMode = fyo.config.get('darkMode'); - }, }, }); diff --git a/src/components/Charts/BarChart.vue b/src/components/Charts/BarChart.vue index cec0286c..ec257f77 100644 --- a/src/components/Charts/BarChart.vue +++ b/src/components/Charts/BarChart.vue @@ -1,33 +1,69 @@