Skip to content

Commit

Permalink
feat(console,phrases): add bring your ui quota item to pricing table
Browse files Browse the repository at this point in the history
  • Loading branch information
charIeszhao committed Jul 19, 2024
1 parent 216859a commit 33389ee
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 113 deletions.
2 changes: 1 addition & 1 deletion packages/connectors/connector-logto-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"access": "public"
},
"devDependencies": {
"@logto/cloud": "0.2.5-a7eedce",
"@logto/cloud": "0.2.5-3b703da",
"@rollup/plugin-commonjs": "^26.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"@fontsource/roboto-mono": "^5.0.0",
"@jest/types": "^29.5.0",
"@logto/cloud": "0.2.5-a7eedce",
"@logto/cloud": "0.2.5-3b703da",
"@logto/connector-kit": "workspace:^4.0.0",
"@logto/core-kit": "workspace:^2.5.0",
"@logto/language-kit": "workspace:^1.1.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/console/src/consts/quota-item-phrases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const quotaItemPhrasesMap: Record<
ssoEnabled: 'sso_enabled.name',
tenantMembersLimit: 'tenant_members_limit.name',
customJwtEnabled: 'custom_jwt_enabled.name',
subjectTokenEnabled: 'impersonation_enabled.name',
bringYourUiEnabled: 'bring_your_ui_enabled.name',
};

export const quotaItemUnlimitedPhrasesMap: Record<
Expand Down Expand Up @@ -56,6 +58,8 @@ export const quotaItemUnlimitedPhrasesMap: Record<
ssoEnabled: 'sso_enabled.unlimited',
tenantMembersLimit: 'tenant_members_limit.unlimited',
customJwtEnabled: 'custom_jwt_enabled.unlimited',
subjectTokenEnabled: 'impersonation_enabled.unlimited',
bringYourUiEnabled: 'bring_your_ui_enabled.unlimited',
};

export const quotaItemLimitedPhrasesMap: Record<
Expand Down Expand Up @@ -84,6 +88,8 @@ export const quotaItemLimitedPhrasesMap: Record<
ssoEnabled: 'sso_enabled.limited',
tenantMembersLimit: 'tenant_members_limit.limited',
customJwtEnabled: 'custom_jwt_enabled.limited',
subjectTokenEnabled: 'impersonation_enabled.limited',
bringYourUiEnabled: 'bring_your_ui_enabled.limited',
};

export const quotaItemNotEligiblePhrasesMap: Record<
Expand Down Expand Up @@ -112,4 +118,6 @@ export const quotaItemNotEligiblePhrasesMap: Record<
ssoEnabled: 'sso_enabled.not_eligible',
tenantMembersLimit: 'tenant_members_limit.not_eligible',
customJwtEnabled: 'custom_jwt_enabled.not_eligible',
subjectTokenEnabled: 'impersonation_enabled.not_eligible',
bringYourUiEnabled: 'bring_your_ui_enabled.not_eligible',
};
2 changes: 2 additions & 0 deletions packages/console/src/consts/tenants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export const defaultSubscriptionPlan: SubscriptionPlan = {
thirdPartyApplicationsLimit: null,
tenantMembersLimit: null,
customJwtEnabled: true,
subjectTokenEnabled: true,
bringYourUiEnabled: true,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function PlanComparisonTable() {
// UI and branding
const customDomain = t('branding.custom_domain');
const customCss = t('branding.custom_css');
const bringYourUi = t('branding.bring_your_ui');
const appLogoAndFavicon = t('branding.logo_and_favicon');
const darkMode = t('branding.dark_mode');
const i18n = t('branding.i18n');
Expand Down Expand Up @@ -186,6 +187,7 @@ function PlanComparisonTable() {
{ name: appLogoAndFavicon, data: ['✓', '✓', '✓'] },
{ name: darkMode, data: ['✓', '✓', '✓'] },
{ name: i18n, data: ['✓', '✓', '✓'] },
{ name: bringYourUi, data: ['-', '✓', '✓'] },
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ const quota_item = {
unlimited: 'Custom JWT',
not_eligible: 'Remove your JWT claims customizer',
},
impersonation_enabled: {
name: 'Impersonation',
limited: 'Impersonation',
unlimited: 'Impersonation',
not_eligible: 'No impersonation allowed',
},
bring_your_ui_enabled: {
name: 'Bring your UI',
limited: 'Bring your UI',
unlimited: 'Bring your UI',
not_eligible: 'Remove your custom UI assets',
},
};

export default Object.freeze(quota_item);
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const quota_table = {
custom_domain: 'Custom domain',
custom_css: 'Custom CSS',
logo_and_favicon: 'Logo and favicon',
bring_your_ui: 'Bring your UI',
dark_mode: 'Dark mode',
i18n: 'Internationalization',
},
Expand Down
Loading

0 comments on commit 33389ee

Please sign in to comment.