mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
refactor(console): update feature tag in card titles (#5136)
This commit is contained in:
parent
8a457f3045
commit
1729def3dd
4 changed files with 24 additions and 11 deletions
|
@ -76,12 +76,12 @@ function GuideCard({ data, onClick, hasBorder, hasButton }: Props) {
|
|||
<div className={styles.infoWrapper}>
|
||||
<div className={styles.flexRow}>
|
||||
<div className={styles.name}>{name}</div>
|
||||
{hasPaywall && (
|
||||
<FeatureTag
|
||||
isVisible={isM2mDisabled}
|
||||
for="upsell"
|
||||
plan={isDevFeaturesEnabled ? ReservedPlanId.Pro : ReservedPlanId.Hobby}
|
||||
/>
|
||||
{/**
|
||||
* Todo @xiaoyijun [Pricing] Remove feature flag
|
||||
* Note: In the new pricing plan, the machine to machine feature is available for Free plan.
|
||||
*/}
|
||||
{hasPaywall && !isDevFeaturesEnabled && (
|
||||
<FeatureTag isVisible={isM2mDisabled} for="upsell" plan={ReservedPlanId.Hobby} />
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.description} title={description}>
|
||||
|
|
|
@ -12,7 +12,7 @@ import EnterpriseSsoConnectorEmpty from '@/assets/images/sso-connector-empty.svg
|
|||
import ItemPreview from '@/components/ItemPreview';
|
||||
import ListPage from '@/components/ListPage';
|
||||
import { defaultPageSize } from '@/consts';
|
||||
import { isCloud } from '@/consts/env';
|
||||
import { isCloud, isDevFeaturesEnabled } from '@/consts/env';
|
||||
import { subscriptionPage } from '@/consts/pages';
|
||||
import { TenantsContext } from '@/contexts/TenantsProvider';
|
||||
import Button from '@/ds-components/Button';
|
||||
|
@ -65,7 +65,11 @@ function EnterpriseSsoConnectors() {
|
|||
<ListPage
|
||||
title={{
|
||||
isBeta: true,
|
||||
paywall: conditional((!isSsoEnabled || isDevTenant) && ReservedPlanId.Hobby),
|
||||
paywall: conditional(
|
||||
(!isSsoEnabled || isDevTenant) &&
|
||||
// Todo @xiaoyijun [Pricing] Remove feature flag
|
||||
(isDevFeaturesEnabled ? ReservedPlanId.Pro : ReservedPlanId.Hobby)
|
||||
),
|
||||
title: 'enterprise_sso.title',
|
||||
subtitle: 'enterprise_sso.subtitle',
|
||||
}}
|
||||
|
|
|
@ -5,6 +5,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|||
|
||||
import ContactUsPhraseLink from '@/components/ContactUsPhraseLink';
|
||||
import PageMeta from '@/components/PageMeta';
|
||||
import { isDevFeaturesEnabled } from '@/consts/env';
|
||||
import { TenantsContext } from '@/contexts/TenantsProvider';
|
||||
import CardTitle from '@/ds-components/CardTitle';
|
||||
import InlineNotification from '@/ds-components/InlineNotification';
|
||||
|
@ -28,7 +29,11 @@ function PageWrapper({ children }: Props) {
|
|||
<PageMeta titleKey="mfa.title" />
|
||||
<CardTitle
|
||||
isBeta
|
||||
paywall={cond((!isMfaEnabled || isDevTenant) && ReservedPlanId.Hobby)}
|
||||
paywall={cond(
|
||||
(!isMfaEnabled || isDevTenant) &&
|
||||
// Todo @xiaoyijun [Pricing] Remove feature flag
|
||||
(isDevFeaturesEnabled ? ReservedPlanId.Pro : ReservedPlanId.Hobby)
|
||||
)}
|
||||
title="mfa.title"
|
||||
subtitle="mfa.description"
|
||||
className={styles.cardTitle}
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
|
|||
|
||||
import Plus from '@/assets/icons/plus.svg';
|
||||
import PageMeta from '@/components/PageMeta';
|
||||
import { isCloud } from '@/consts/env';
|
||||
import { isCloud, isDevFeaturesEnabled } from '@/consts/env';
|
||||
import { subscriptionPage } from '@/consts/pages';
|
||||
import { TenantsContext } from '@/contexts/TenantsProvider';
|
||||
import Button from '@/ds-components/Button';
|
||||
|
@ -71,7 +71,11 @@ function Organizations({ tab }: Props) {
|
|||
<div className={pageLayout.headline}>
|
||||
<CardTitle
|
||||
isBeta
|
||||
paywall={cond((isOrganizationsDisabled || isDevTenant) && ReservedPlanId.Hobby)}
|
||||
paywall={cond(
|
||||
(isOrganizationsDisabled || isDevTenant) &&
|
||||
// Todo @xiaoyijun [Pricing] Remove feature flag
|
||||
(isDevFeaturesEnabled ? ReservedPlanId.Pro : ReservedPlanId.Hobby)
|
||||
)}
|
||||
title="organizations.title"
|
||||
subtitle="organizations.subtitle"
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue