From a4cae1815128343d5c38106510aead0d2590fae6 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Fri, 9 Jun 2023 13:20:49 +0800 Subject: [PATCH] feat(console): enable custom domain feature (#4013) --- .../src/containers/ConsoleContent/Sidebar/hook.tsx | 4 ++-- packages/console/src/containers/ConsoleContent/index.tsx | 8 +++++--- packages/console/src/pages/TenantSettings/index.tsx | 9 ++++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx b/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx index d8f8e0555..676c413b3 100644 --- a/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx +++ b/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx @@ -13,7 +13,7 @@ import UserProfile from '@/assets/images/profile.svg'; import ResourceIcon from '@/assets/images/resource.svg'; import Role from '@/assets/images/role.svg'; import Web from '@/assets/images/web.svg'; -import { isCloud, isProduction } from '@/consts/env'; +import { isCloud } from '@/consts/env'; import useUserPreferences from '@/hooks/use-user-preferences'; type SidebarItem = { @@ -112,7 +112,7 @@ export const useSidebarMenuItems = (): { }, { title: 'tenant', - isHidden: !(isCloud && !isProduction), + isHidden: !isCloud, items: [ { Icon: Gear, diff --git a/packages/console/src/containers/ConsoleContent/index.tsx b/packages/console/src/containers/ConsoleContent/index.tsx index b4dcb7fe3..1a8bff97e 100644 --- a/packages/console/src/containers/ConsoleContent/index.tsx +++ b/packages/console/src/containers/ConsoleContent/index.tsx @@ -142,10 +142,12 @@ function ConsoleContent() { } /> } /> - {isCloud && !isProduction && ( + {isCloud && ( }> - } /> - } /> + } /> + {!isProduction && ( + } /> + )} } /> )} diff --git a/packages/console/src/pages/TenantSettings/index.tsx b/packages/console/src/pages/TenantSettings/index.tsx index ccc32932f..2219bd595 100644 --- a/packages/console/src/pages/TenantSettings/index.tsx +++ b/packages/console/src/pages/TenantSettings/index.tsx @@ -4,6 +4,7 @@ import CardTitle from '@/components/CardTitle'; import DynamicT from '@/components/DynamicT'; import TabNav, { TabNavItem } from '@/components/TabNav'; import { TenantSettingsTabs } from '@/consts'; +import { isProduction } from '@/consts/env'; import * as styles from './index.module.scss'; @@ -12,9 +13,11 @@ function TenantSettings() {
- - - + {!isProduction && ( + + + + )}