mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
feat(console): enable custom domain feature (#4013)
This commit is contained in:
parent
cd679359e1
commit
a4cae18151
3 changed files with 13 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -142,10 +142,12 @@ function ConsoleContent() {
|
|||
<Route path="link-email" element={<LinkEmailModal />} />
|
||||
<Route path="verification-code" element={<VerificationCodeModal />} />
|
||||
</Route>
|
||||
{isCloud && !isProduction && (
|
||||
{isCloud && (
|
||||
<Route path="tenant-settings" element={<TenantSettings />}>
|
||||
<Route index element={<Navigate replace to={TenantSettingsTabs.Settings} />} />
|
||||
<Route path={TenantSettingsTabs.Settings} element={<TenantBasicSettings />} />
|
||||
<Route index element={<Navigate replace to={TenantSettingsTabs.Domains} />} />
|
||||
{!isProduction && (
|
||||
<Route path={TenantSettingsTabs.Settings} element={<TenantBasicSettings />} />
|
||||
)}
|
||||
<Route path={TenantSettingsTabs.Domains} element={<TenantDomainSettings />} />
|
||||
</Route>
|
||||
)}
|
||||
|
|
|
@ -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() {
|
|||
<div className={styles.container}>
|
||||
<CardTitle title="tenant_settings.title" subtitle="tenant_settings.description" />
|
||||
<TabNav>
|
||||
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Settings}`}>
|
||||
<DynamicT forKey="tenant_settings.tabs.settings" />
|
||||
</TabNavItem>
|
||||
{!isProduction && (
|
||||
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Settings}`}>
|
||||
<DynamicT forKey="tenant_settings.tabs.settings" />
|
||||
</TabNavItem>
|
||||
)}
|
||||
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Domains}`}>
|
||||
<DynamicT forKey="tenant_settings.tabs.domains" />
|
||||
</TabNavItem>
|
||||
|
|
Loading…
Reference in a new issue