0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

feat(console): add subscription page (#4118)

This commit is contained in:
Xiao Yijun 2023-07-06 14:15:53 +08:00 committed by GitHub
parent 05b948dbb2
commit 034cd69599
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 0 deletions

View file

@ -1,4 +1,5 @@
import { yes } from '@silverhand/essentials';
export const isProduction = process.env.NODE_ENV === 'production';
export const isCloud = yes(process.env.IS_CLOUD);
export const adminEndpoint = process.env.ADMIN_ENDPOINT;

View file

@ -34,4 +34,5 @@ export enum RoleDetailsTabs {
export enum TenantSettingsTabs {
Settings = 'settings',
Domains = 'domains',
Subscription = 'subscription',
}

View file

@ -36,6 +36,7 @@ import RoleUsers from '@/pages/RoleDetails/RoleUsers';
import Roles from '@/pages/Roles';
import SignInExperience from '@/pages/SignInExperience';
import TenantSettings from '@/pages/TenantSettings';
import Subscription from '@/pages/TenantSettings/Subscription';
import TenantBasicSettings from '@/pages/TenantSettings/TenantBasicSettings';
import TenantDomainSettings from '@/pages/TenantSettings/TenantDomainSettings';
import UserDetails from '@/pages/UserDetails';
@ -147,6 +148,7 @@ function ConsoleContent() {
<Route index element={<Navigate replace to={TenantSettingsTabs.Settings} />} />
<Route path={TenantSettingsTabs.Settings} element={<TenantBasicSettings />} />
<Route path={TenantSettingsTabs.Domains} element={<TenantDomainSettings />} />
<Route path={TenantSettingsTabs.Subscription} element={<Subscription />} />
</Route>
)}
</Routes>

View file

@ -0,0 +1,14 @@
import { withAppInsights } from '@logto/app-insights/react';
import PageMeta from '@/components/PageMeta';
function Subscription() {
return (
<div>
<PageMeta titleKey={['tenants.tabs.subscription', 'tenants.title']} />
WIP
</div>
);
}
export default withAppInsights(Subscription);

View file

@ -1,6 +1,7 @@
import { Outlet } from 'react-router-dom';
import { TenantSettingsTabs } from '@/consts';
import { isProduction } from '@/consts/env';
import CardTitle from '@/ds-components/CardTitle';
import DynamicT from '@/ds-components/DynamicT';
import TabNav, { TabNavItem } from '@/ds-components/TabNav';
@ -22,6 +23,11 @@ function TenantSettings() {
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Domains}`}>
<DynamicT forKey="tenants.tabs.domains" />
</TabNavItem>
{!isProduction && (
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Subscription}`}>
<DynamicT forKey="tenants.tabs.subscription" />
</TabNavItem>
)}
</TabNav>
<Outlet />
</div>