Browse Source

Merge pull request #2836 from nocodb/fix/disable-dark

fix(gui-v2): force disable dark mode
pull/2840/head
Pranav C 2 years ago committed by GitHub
parent
commit
bb8e4c72e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      packages/nc-gui-v2/components/dashboard/TreeView.vue
  2. 5
      packages/nc-gui-v2/composables/useGlobalState.ts

14
packages/nc-gui-v2/components/dashboard/TreeView.vue

@ -198,7 +198,7 @@ const addTableTab = (table: TableType) => {
<template>
<div class="nc-treeview-container flex flex-column">
<div class="p-1">
<div class="px-3 py-2">
<a-input-search
v-model:value="filterQuery"
size="small"
@ -232,7 +232,7 @@ const addTableTab = (table: TableType) => {
:key="table.id"
v-t="['a:table:open']"
:class="{ hidden: !filteredTables?.includes(table) }"
class="!pl-1 py-1 !h-[28px] !my-0 text-sm pointer group"
class="!pl-1 py-1 !h-[28px] !my-0 text-sm cursor-pointer group"
:data-order="table.order"
:data-id="table.id"
@click="addTableTab(table)"
@ -298,12 +298,8 @@ const addTableTab = (table: TableType) => {
</template>
<style scoped>
.pointer {
cursor: pointer;
}
.nc-treeview-container {
height: calc(100vh - var(--header-height));
@apply h-[calc(100vh_-_var(--header-height))];
}
.nc-treeview-footer-item {
@ -317,4 +313,8 @@ const addTableTab = (table: TableType) => {
:deep(.ant-dropdown-menu-title-content) {
@apply !p-2;
}
:deep(.ant-input-group-addon:last-child) {
@apply top-[-0.5px];
}
</style>

5
packages/nc-gui-v2/composables/useGlobalState.ts

@ -27,8 +27,8 @@ export const useGlobalState = (): GlobalState => {
const preferredLanguages = $(usePreferredLanguages())
/** 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)
@ -72,6 +72,9 @@ export const useGlobalState = (): GlobalState => {
/** saves a reactive state, any change to these values will write/delete to localStorage */
const storage = $(useStorage<StoredState>(storageKey, initialState))
/** force turn off of dark mode, regardless of previously stored settings */
storage.darkMode = false
/** current token ref, used by `useJwt` to reactively parse our token payload */
let token = $computed({
get: () => storage.token || '',

Loading…
Cancel
Save