mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
chore(console): should use SKU to filter tenant dropdown and add display of dev/admin plan (#6509)
This commit is contained in:
parent
a0807d7e5a
commit
64547fd4ba
18 changed files with 67 additions and 5 deletions
|
@ -10,6 +10,8 @@ const registeredSkuIdNamePhraseMap: Record<
|
|||
quotaKey: undefined,
|
||||
[ReservedSkuId.Free]: 'free_plan',
|
||||
[ReservedSkuId.Pro]: 'pro_plan',
|
||||
[ReservedSkuId.Development]: 'dev_plan',
|
||||
[ReservedSkuId.Admin]: 'admin_plan',
|
||||
[ReservedSkuId.Enterprise]: 'enterprise',
|
||||
};
|
||||
|
||||
|
|
|
@ -26,13 +26,13 @@ function TenantDropdownItem({ tenantData, isSelected, onClick }: Props) {
|
|||
subscription: { planId },
|
||||
} = tenantData;
|
||||
|
||||
const { subscriptionPlans } = useContext(SubscriptionDataContext);
|
||||
const tenantSubscriptionPlan = useMemo(
|
||||
() => subscriptionPlans.find((plan) => plan.id === planId),
|
||||
[subscriptionPlans, planId]
|
||||
const { logtoSkus } = useContext(SubscriptionDataContext);
|
||||
const tenantSubscriptionSku = useMemo(
|
||||
() => logtoSkus.find(({ id }) => id === planId),
|
||||
[logtoSkus, planId]
|
||||
);
|
||||
|
||||
if (!tenantSubscriptionPlan) {
|
||||
if (!tenantSubscriptionSku) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ export enum ReservedPlanName {
|
|||
export enum ReservedSkuId {
|
||||
Free = 'free',
|
||||
Pro = 'pro',
|
||||
Development = 'dev',
|
||||
Admin = 'admin',
|
||||
Enterprise = 'enterprise',
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@ const subscription = {
|
|||
pro_plan: 'Pro plan',
|
||||
pro_plan_description: 'Für Unternehmen, die sorgenfrei von Logto profitieren möchten.',
|
||||
enterprise: 'Unternehmen',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Aktueller Plan',
|
||||
current_plan_description:
|
||||
'Hier ist dein aktueller Tarif. Du kannst einfach deinen Tarifverbrauch einsehen, deine anstehende Rechnung überprüfen und bei Bedarf Änderungen an deinem Tarif vornehmen.',
|
||||
|
|
|
@ -8,6 +8,8 @@ const subscription = {
|
|||
pro_plan: 'Pro plan',
|
||||
pro_plan_description: 'For businesses benefit worry-free with Logto.',
|
||||
enterprise: 'Enterprise',
|
||||
admin_plan: 'Admin plan',
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Current plan',
|
||||
current_plan_description:
|
||||
'Here’s your current plan. You can easily see your plan usage, check your upcoming bill, and make changes to your plan as needed.',
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'Plan Pro',
|
||||
pro_plan_description: 'Benefíciese sin preocupaciones con Logto para empresas.',
|
||||
enterprise: 'Empresa',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Plan Actual',
|
||||
current_plan_description:
|
||||
'Aquí está tu plan actual. Puedes ver fácilmente el uso de tu plan, revisar tu próxima factura y hacer cambios en tu plan según sea necesario.',
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'Plan Professionnel',
|
||||
pro_plan_description: 'Pour les entreprises qui bénéficient de Logto sans soucis.',
|
||||
enterprise: 'Entreprise',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Plan Actuel',
|
||||
current_plan_description:
|
||||
"Voici votre plan actuel. Vous pouvez facilement consulter l'utilisation de votre plan, vérifier votre prochaine facture et apporter des modifications à votre plan si nécessaire.",
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'Piano Pro',
|
||||
pro_plan_description: 'Per aziende che beneficiano di Logto senza preoccupazioni.',
|
||||
enterprise: 'Azienda',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Piano attuale',
|
||||
current_plan_description:
|
||||
"Ecco il tuo piano attuale. Puoi facilmente visualizzare l'utilizzo del tuo piano, controllare la tua prossima fattura e apportare modifiche al piano, se necessario.",
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'プロプラン',
|
||||
pro_plan_description: 'ビジネスが安心してLogtoを利用できるプランです。',
|
||||
enterprise: 'エンタープライズ',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: '現在のプラン',
|
||||
current_plan_description:
|
||||
'現在のプランはこちらです。プランの使用状況を簡単に確認したり、次回の請求を確認したり、必要に応じてプランを変更したりできます。',
|
||||
|
|
|
@ -7,6 +7,10 @@ const subscription = {
|
|||
pro_plan: '프로 요금제',
|
||||
pro_plan_description: 'Logto와 함께 걱정 없이 비즈니스 혜택을 받으세요.',
|
||||
enterprise: '기업용',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: '현재 요금제',
|
||||
current_plan_description:
|
||||
'현재 사용중인 요금제 정보입니다. 요금제 사용 내역을 쉽게 확인하고, 다가오는 청구서를 확인하며 필요에 따라 요금제를 변경할 수 있습니다.',
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'Plan Pro',
|
||||
pro_plan_description: 'Dla firm, ciesz się bezstresową obsługą Logto.',
|
||||
enterprise: 'Przedsiębiorstwo',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Obecny plan',
|
||||
current_plan_description:
|
||||
'Oto Twój obecny plan. Łatwo możesz sprawdzić wykorzystanie swojego planu, sprawdzić nadchodzący rachunek i dokonać zmian w planie, jeśli jest to konieczne.',
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'Plano Pro',
|
||||
pro_plan_description: 'Para empresas se beneficiarem tranquilo com o Logto.',
|
||||
enterprise: 'Empresa',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Plano Atual',
|
||||
current_plan_description:
|
||||
'Aqui está o seu plano atual. Você pode facilmente ver o uso do seu plano, verificar a sua próxima fatura e fazer alterações no plano, conforme necessário.',
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'Plano Pro',
|
||||
pro_plan_description: 'Para empresas que desejam se beneficiar sem preocupações com o Logto.',
|
||||
enterprise: 'Empresa',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Plano Atual',
|
||||
current_plan_description:
|
||||
'Aqui está o seu plano atual. Pode facilmente verificar a utilização do seu plano, verificar a sua próxima fatura e efetuar alterações no seu plano, conforme necessário.',
|
||||
|
|
|
@ -7,6 +7,10 @@ const subscription = {
|
|||
pro_plan: 'Про план',
|
||||
pro_plan_description: 'Позволяет бизнесу использовать Logto без забот.',
|
||||
enterprise: 'Enterprise',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Текущий план',
|
||||
current_plan_description:
|
||||
'Вот ваш текущий тарифный план. Вы можете легко просмотреть использование вашего тарифа, проверить предстоящий счет и вносить изменения в тариф по мере необходимости.',
|
||||
|
|
|
@ -8,6 +8,10 @@ const subscription = {
|
|||
pro_plan: 'Pro plan',
|
||||
pro_plan_description: "Endişesiz bir şekilde Logto'dan faydalanan işletmeler için.",
|
||||
enterprise: 'Kurumsal',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: 'Mevcut Plan',
|
||||
current_plan_description:
|
||||
'İşte mevcut planınız. Plan kullanımınızı kolayca görebilir, önümüzdeki faturanızı kontrol edebilir ve ihtiyaç duydukça planınızda değişiklikler yapabilirsiniz.',
|
||||
|
|
|
@ -7,6 +7,10 @@ const subscription = {
|
|||
pro_plan: '专业计划',
|
||||
pro_plan_description: '适用于企业付费无忧。',
|
||||
enterprise: '企业',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: '当前计划',
|
||||
current_plan_description:
|
||||
'以下是您当前的计划。您可以轻松查看计划使用情况,检查即将到来的账单,并根据需要对计划进行更改。',
|
||||
|
|
|
@ -7,6 +7,10 @@ const subscription = {
|
|||
pro_plan: '專業計劃',
|
||||
pro_plan_description: '供企業放心使用Logto。',
|
||||
enterprise: '企業',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: '當前計劃',
|
||||
current_plan_description:
|
||||
'以下是您目前的計劃。您可以輕鬆查看計劃使用情況,檢查即將到來的帳單,並根據需要進行變更。',
|
||||
|
|
|
@ -7,6 +7,10 @@ const subscription = {
|
|||
pro_plan: '專業方案',
|
||||
pro_plan_description: '企業無憂享受 Logto 服務。',
|
||||
enterprise: '企業版',
|
||||
/** UNTRANSLATED */
|
||||
admin_plan: 'Admin plan',
|
||||
/** UNTRANSLATED */
|
||||
dev_plan: 'Development plan',
|
||||
current_plan: '當前方案',
|
||||
current_plan_description:
|
||||
'這是您目前的方案。您可以輕鬆查看您的方案使用情況,檢查即將到來的帳單,並根據需要進行變更。',
|
||||
|
|
Loading…
Add table
Reference in a new issue