From 1586d3a8c42a7e34a6cd3ccfa001046155da6480 Mon Sep 17 00:00:00 2001
From: braks <78412429+bcakmakoglu@users.noreply.github.com>
Date: Wed, 20 Jul 2022 20:34:17 +0200
Subject: [PATCH] refactor(gui-v2): disable dark mode
# What's changed?
* remove color mode toggle from header
* set preferred color scheme to light
---
packages/nc-gui-v2/app.vue | 2 --
packages/nc-gui-v2/composables/useGlobalState.ts | 8 +++++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/nc-gui-v2/app.vue b/packages/nc-gui-v2/app.vue
index a032e792c9..333a79e552 100644
--- a/packages/nc-gui-v2/app.vue
+++ b/packages/nc-gui-v2/app.vue
@@ -55,8 +55,6 @@ const sidebarOpen = computed({
-
-
diff --git a/packages/nc-gui-v2/composables/useGlobalState.ts b/packages/nc-gui-v2/composables/useGlobalState.ts
index fbcb9baf6f..e2620bb958 100644
--- a/packages/nc-gui-v2/composables/useGlobalState.ts
+++ b/packages/nc-gui-v2/composables/useGlobalState.ts
@@ -1,4 +1,4 @@
-import { breakpointsTailwind, usePreferredDark, usePreferredLanguages, useStorage } from '@vueuse/core'
+import { breakpointsTailwind, usePreferredLanguages, useStorage } from '@vueuse/core'
import { useJwt } from '@vueuse/integrations/useJwt'
import type { JwtPayload } from 'jwt-decode'
import { computed, ref, toRefs, useBreakpoints, useNuxtApp, useTimestamp, watch } from '#imports'
@@ -25,8 +25,10 @@ const storageKey = 'nocodb-gui-v2'
export const useGlobalState = (): GlobalState => {
/** get the preferred languages of a user, according to browser settings */
const preferredLanguages = $(usePreferredLanguages())
- /** get the preferred dark mode setting, according to browser settings */
- const prefersDarkMode = $(usePreferredDark())
+ /** todo: reimplement; get the preferred dark mode setting, according to browser settings */
+ // const prefersDarkMode = $(usePreferredDark())
+
+ const prefersDarkMode = false
/** get current breakpoints (for enabling sidebar) */
const breakpoints = useBreakpoints(breakpointsTailwind)