mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -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 ResourceIcon from '@/assets/images/resource.svg';
|
||||||
import Role from '@/assets/images/role.svg';
|
import Role from '@/assets/images/role.svg';
|
||||||
import Web from '@/assets/images/web.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';
|
import useUserPreferences from '@/hooks/use-user-preferences';
|
||||||
|
|
||||||
type SidebarItem = {
|
type SidebarItem = {
|
||||||
|
@ -112,7 +112,7 @@ export const useSidebarMenuItems = (): {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'tenant',
|
title: 'tenant',
|
||||||
isHidden: !(isCloud && !isProduction),
|
isHidden: !isCloud,
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
Icon: Gear,
|
Icon: Gear,
|
||||||
|
|
|
@ -142,10 +142,12 @@ function ConsoleContent() {
|
||||||
<Route path="link-email" element={<LinkEmailModal />} />
|
<Route path="link-email" element={<LinkEmailModal />} />
|
||||||
<Route path="verification-code" element={<VerificationCodeModal />} />
|
<Route path="verification-code" element={<VerificationCodeModal />} />
|
||||||
</Route>
|
</Route>
|
||||||
{isCloud && !isProduction && (
|
{isCloud && (
|
||||||
<Route path="tenant-settings" element={<TenantSettings />}>
|
<Route path="tenant-settings" element={<TenantSettings />}>
|
||||||
<Route index element={<Navigate replace to={TenantSettingsTabs.Settings} />} />
|
<Route index element={<Navigate replace to={TenantSettingsTabs.Domains} />} />
|
||||||
<Route path={TenantSettingsTabs.Settings} element={<TenantBasicSettings />} />
|
{!isProduction && (
|
||||||
|
<Route path={TenantSettingsTabs.Settings} element={<TenantBasicSettings />} />
|
||||||
|
)}
|
||||||
<Route path={TenantSettingsTabs.Domains} element={<TenantDomainSettings />} />
|
<Route path={TenantSettingsTabs.Domains} element={<TenantDomainSettings />} />
|
||||||
</Route>
|
</Route>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import CardTitle from '@/components/CardTitle';
|
||||||
import DynamicT from '@/components/DynamicT';
|
import DynamicT from '@/components/DynamicT';
|
||||||
import TabNav, { TabNavItem } from '@/components/TabNav';
|
import TabNav, { TabNavItem } from '@/components/TabNav';
|
||||||
import { TenantSettingsTabs } from '@/consts';
|
import { TenantSettingsTabs } from '@/consts';
|
||||||
|
import { isProduction } from '@/consts/env';
|
||||||
|
|
||||||
import * as styles from './index.module.scss';
|
import * as styles from './index.module.scss';
|
||||||
|
|
||||||
|
@ -12,9 +13,11 @@ function TenantSettings() {
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<CardTitle title="tenant_settings.title" subtitle="tenant_settings.description" />
|
<CardTitle title="tenant_settings.title" subtitle="tenant_settings.description" />
|
||||||
<TabNav>
|
<TabNav>
|
||||||
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Settings}`}>
|
{!isProduction && (
|
||||||
<DynamicT forKey="tenant_settings.tabs.settings" />
|
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Settings}`}>
|
||||||
</TabNavItem>
|
<DynamicT forKey="tenant_settings.tabs.settings" />
|
||||||
|
</TabNavItem>
|
||||||
|
)}
|
||||||
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Domains}`}>
|
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Domains}`}>
|
||||||
<DynamicT forKey="tenant_settings.tabs.domains" />
|
<DynamicT forKey="tenant_settings.tabs.domains" />
|
||||||
</TabNavItem>
|
</TabNavItem>
|
||||||
|
|
Loading…
Add table
Reference in a new issue