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)