diff --git a/fyo/models/SystemSettings.ts b/fyo/models/SystemSettings.ts index 59432187..71a83769 100644 --- a/fyo/models/SystemSettings.ts +++ b/fyo/models/SystemSettings.ts @@ -16,6 +16,7 @@ export default class SystemSettings extends Doc { currency?: string; version?: string; instanceId?: string; + darkMode?: boolean; validations: ValidationMap = { displayPrecision(value: DocValue) { diff --git a/src/App.vue b/src/App.vue index 00114924..0e21b0e3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -135,9 +135,9 @@ export default defineComponent({ }, async mounted() { await this.setInitialScreen(); - const { darkMode } = await fyo.doc.getDoc('SystemSettings'); - setDarkMode(!!darkMode); - this.darkMode = !!darkMode; + const darkMode = !!fyo.singles.SystemSettings?.darkMode; + setDarkMode(darkMode); + this.darkMode = darkMode; }, methods: { async setInitialScreen(): Promise {