Browse Source

fix(nc-gui): show selected theme color

pull/3669/head
braks 2 years ago committed by Raju Udava
parent
commit
ecab29558c
  1. 4
      packages/nc-gui/composables/useTheme/index.ts
  2. 4
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue

4
packages/nc-gui/composables/useTheme/index.ts

@ -28,8 +28,8 @@ export const useTheme = createGlobalState((config?: Partial<ThemeConfig>) => {
accentColor.value = themeAccent.isValid() ? hexToRGB(themeAccent.toHex8String()) : hexToRGB(themeV2Colors.pink['500'])
currentTheme.value = {
primaryColor: themePrimary.toHex8String().toUpperCase(),
accentColor: themeAccent.toHex8String().toUpperCase(),
primaryColor: themePrimary.toHex8String().toUpperCase().slice(0, -2),
accentColor: themeAccent.toHex8String().toUpperCase().slice(0, -2),
}
ConfigProvider.config({

4
packages/nc-gui/pages/[projectType]/[projectId]/index.vue

@ -21,6 +21,7 @@ import {
useRouter,
useSidebar,
useTabs,
useTheme,
useUIPermission,
} from '#imports'
import { TabType } from '~/lib'
@ -29,6 +30,8 @@ definePageMeta({
hideHeader: true,
})
const { theme } = useTheme()
const { t } = useI18n()
const route = useRoute()
@ -336,6 +339,7 @@ onBeforeUnmount(reset)
<template #expandIcon></template>
<LazyGeneralColorPicker
:model-value="theme.primaryColor"
:colors="projectThemeColors"
:row-size="9"
:advanced="false"

Loading…
Cancel
Save