Browse Source

refactor(gui-v2): disable dark mode

# What's changed?

* remove color mode toggle from header
* set preferred color scheme to light
pull/2730/head
braks 2 years ago
parent
commit
c014915aeb
  1. 2
      packages/nc-gui-v2/app.vue
  2. 8
      packages/nc-gui-v2/composables/useGlobalState.ts

2
packages/nc-gui-v2/app.vue

@ -55,8 +55,6 @@ const sidebarOpen = computed({
<div class="flex-1" />
<div class="flex justify-end gap-4">
<general-color-mode-switcher v-model="$state.darkMode.value" />
<general-language class="mr-3" />
<template v-if="$state.signedIn.value">

8
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)

Loading…
Cancel
Save