From ecab29558c7182a37f477743dbfcf4b17f1f1b16 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 6 Oct 2022 12:07:04 +0200 Subject: [PATCH] fix(nc-gui): show selected theme color --- packages/nc-gui/composables/useTheme/index.ts | 4 ++-- packages/nc-gui/pages/[projectType]/[projectId]/index.vue | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/composables/useTheme/index.ts b/packages/nc-gui/composables/useTheme/index.ts index 69086fb94b..373ba8e922 100644 --- a/packages/nc-gui/composables/useTheme/index.ts +++ b/packages/nc-gui/composables/useTheme/index.ts @@ -28,8 +28,8 @@ export const useTheme = createGlobalState((config?: Partial) => { 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({ diff --git a/packages/nc-gui/pages/[projectType]/[projectId]/index.vue b/packages/nc-gui/pages/[projectType]/[projectId]/index.vue index 4f8e7b8b7e..44ee2edbba 100644 --- a/packages/nc-gui/pages/[projectType]/[projectId]/index.vue +++ b/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)