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'; import { yes } from '@silverhand/essentials';
export const isProduction = process.env.NODE_ENV === 'production';
export const isCloud = yes(process.env.IS_CLOUD); export const isCloud = yes(process.env.IS_CLOUD);
export const adminEndpoint = process.env.ADMIN_ENDPOINT; export const adminEndpoint = process.env.ADMIN_ENDPOINT;

View file

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

View file

@ -36,6 +36,7 @@ import RoleUsers from '@/pages/RoleDetails/RoleUsers';
import Roles from '@/pages/Roles'; import Roles from '@/pages/Roles';
import SignInExperience from '@/pages/SignInExperience'; import SignInExperience from '@/pages/SignInExperience';
import TenantSettings from '@/pages/TenantSettings'; import TenantSettings from '@/pages/TenantSettings';
import Subscription from '@/pages/TenantSettings/Subscription';
import TenantBasicSettings from '@/pages/TenantSettings/TenantBasicSettings'; import TenantBasicSettings from '@/pages/TenantSettings/TenantBasicSettings';
import TenantDomainSettings from '@/pages/TenantSettings/TenantDomainSettings'; import TenantDomainSettings from '@/pages/TenantSettings/TenantDomainSettings';
import UserDetails from '@/pages/UserDetails'; import UserDetails from '@/pages/UserDetails';
@ -147,6 +148,7 @@ function ConsoleContent() {
<Route index element={<Navigate replace to={TenantSettingsTabs.Settings} />} /> <Route index element={<Navigate replace to={TenantSettingsTabs.Settings} />} />
<Route path={TenantSettingsTabs.Settings} element={<TenantBasicSettings />} /> <Route path={TenantSettingsTabs.Settings} element={<TenantBasicSettings />} />
<Route path={TenantSettingsTabs.Domains} element={<TenantDomainSettings />} /> <Route path={TenantSettingsTabs.Domains} element={<TenantDomainSettings />} />
<Route path={TenantSettingsTabs.Subscription} element={<Subscription />} />
</Route> </Route>
)} )}
</Routes> </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 { Outlet } from 'react-router-dom';
import { TenantSettingsTabs } from '@/consts'; import { TenantSettingsTabs } from '@/consts';
import { isProduction } from '@/consts/env';
import CardTitle from '@/ds-components/CardTitle'; import CardTitle from '@/ds-components/CardTitle';
import DynamicT from '@/ds-components/DynamicT'; import DynamicT from '@/ds-components/DynamicT';
import TabNav, { TabNavItem } from '@/ds-components/TabNav'; import TabNav, { TabNavItem } from '@/ds-components/TabNav';
@ -22,6 +23,11 @@ function TenantSettings() {
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Domains}`}> <TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Domains}`}>
<DynamicT forKey="tenants.tabs.domains" /> <DynamicT forKey="tenants.tabs.domains" />
</TabNavItem> </TabNavItem>
{!isProduction && (
<TabNavItem href={`/tenant-settings/${TenantSettingsTabs.Subscription}`}>
<DynamicT forKey="tenants.tabs.subscription" />
</TabNavItem>
)}
</TabNav> </TabNav>
<Outlet /> <Outlet />
</div> </div>