mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
refactor: improve user experience (#5958)
This commit is contained in:
parent
0c70d65c7b
commit
522dd02f44
18 changed files with 11 additions and 43 deletions
|
@ -112,7 +112,7 @@ function CreateTenantModal({ isOpen, onClose }: Props) {
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormField
|
<FormField
|
||||||
title="tenants.settings.tenant_region"
|
title="tenants.settings.tenant_region"
|
||||||
description="tenants.settings.tenant_region_description"
|
tip={t('tenants.settings.tenant_region_description')}
|
||||||
>
|
>
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
|
|
|
@ -66,7 +66,9 @@ function CreateTenant() {
|
||||||
|
|
||||||
const onCreateClick = handleSubmit(
|
const onCreateClick = handleSubmit(
|
||||||
trySubmitSafe(async ({ name, regionName, collaboratorEmails }: CreateTenantForm) => {
|
trySubmitSafe(async ({ name, regionName, collaboratorEmails }: CreateTenantForm) => {
|
||||||
const newTenant = await cloudApi.post('/api/tenants', { body: { name, regionName } });
|
const newTenant = await cloudApi.post('/api/tenants', {
|
||||||
|
body: { name: name || 'My project', regionName },
|
||||||
|
});
|
||||||
prependTenant(newTenant);
|
prependTenant(newTenant);
|
||||||
toast.success(t('tenants.create_modal.tenant_created'));
|
toast.success(t('tenants.create_modal.tenant_created'));
|
||||||
|
|
||||||
|
@ -104,19 +106,19 @@ function CreateTenant() {
|
||||||
<div className={pageLayout.title}>{t('cloud.create_tenant.title')}</div>
|
<div className={pageLayout.title}>{t('cloud.create_tenant.title')}</div>
|
||||||
<div className={pageLayout.description}>{t('cloud.create_tenant.description')}</div>
|
<div className={pageLayout.description}>{t('cloud.create_tenant.description')}</div>
|
||||||
<FormProvider {...methods}>
|
<FormProvider {...methods}>
|
||||||
<FormField isRequired title="tenants.settings.tenant_name">
|
<FormField title="tenants.settings.tenant_name">
|
||||||
<TextInput
|
<TextInput
|
||||||
// eslint-disable-next-line jsx-a11y/no-autofocus
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
||||||
autoFocus
|
autoFocus
|
||||||
placeholder="My project"
|
placeholder="My project"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
{...register('name', { required: true })}
|
{...register('name')}
|
||||||
error={Boolean(errors.name)}
|
error={Boolean(errors.name)}
|
||||||
/>
|
/>
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormField
|
<FormField
|
||||||
title="tenants.settings.tenant_region"
|
title="tenants.settings.tenant_region"
|
||||||
description="tenants.settings.tenant_region_description"
|
tip={t('tenants.settings.tenant_region_description')}
|
||||||
>
|
>
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
|
|
|
@ -15,7 +15,6 @@ import Facebook from '../../assets/icons/social-facebook.svg';
|
||||||
import Kakao from '../../assets/icons/social-kakao.svg';
|
import Kakao from '../../assets/icons/social-kakao.svg';
|
||||||
import Microsoft from '../../assets/icons/social-microsoft.svg';
|
import Microsoft from '../../assets/icons/social-microsoft.svg';
|
||||||
import Oidc from '../../assets/icons/social-oidc.svg';
|
import Oidc from '../../assets/icons/social-oidc.svg';
|
||||||
import Smal from '../../assets/icons/social-smal.svg';
|
|
||||||
|
|
||||||
import { Authentication } from './types';
|
import { Authentication } from './types';
|
||||||
|
|
||||||
|
@ -86,12 +85,4 @@ export const fakeSocialTargetOptions: MultiCardSelectorOption[] = [
|
||||||
isDisabled: true,
|
isDisabled: true,
|
||||||
disabledTip: 'cloud.sie.connectors.unlocked_later_tip',
|
disabledTip: 'cloud.sie.connectors.unlocked_later_tip',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
icon: <Smal />,
|
|
||||||
title: <DangerousRaw>SAML</DangerousRaw>,
|
|
||||||
value: 'fake-saml',
|
|
||||||
tag: 'cloud.sie.connectors.unlocked_later',
|
|
||||||
isDisabled: true,
|
|
||||||
disabledTip: 'cloud.sie.connectors.unlocked_later_tip',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -47,8 +47,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Mieter erstellen',
|
title: 'Mieter erstellen',
|
||||||
subtitle:
|
|
||||||
'Erstellen Sie einen neuen Mandanten mit isolierten Ressourcen und Benutzern. Die gehosteten Datenregionen und Mandantentypen können nach der Erstellung nicht geändert werden.',
|
|
||||||
tenant_usage_purpose: 'Wofür möchten Sie diesen Mieter verwenden?',
|
tenant_usage_purpose: 'Wofür möchten Sie diesen Mieter verwenden?',
|
||||||
development_description:
|
development_description:
|
||||||
'Nur für Tests und sollte nicht in der Produktion verwendet werden. Es ist kein Abonnement erforderlich.',
|
'Nur für Tests und sollte nicht in der Produktion verwendet werden. Es ist kein Abonnement erforderlich.',
|
||||||
|
|
|
@ -12,10 +12,10 @@ const tenants = {
|
||||||
title: 'SETTINGS',
|
title: 'SETTINGS',
|
||||||
description: 'Set the tenant name and view your data hosted region and tenant type.',
|
description: 'Set the tenant name and view your data hosted region and tenant type.',
|
||||||
tenant_id: 'Tenant ID',
|
tenant_id: 'Tenant ID',
|
||||||
tenant_name: 'Tenant Name',
|
tenant_name: 'Tenant name',
|
||||||
tenant_region: 'Data region',
|
tenant_region: 'Data region',
|
||||||
tenant_region_description:
|
tenant_region_description:
|
||||||
'The physical location where your tenant resources (users, apps, etc.) are hosted. This can’t be changed after creation.',
|
'The physical location where your tenant resources (users, apps, etc.) are hosted. This cannot be changed after creation.',
|
||||||
tenant_region_tip: 'Your tenant resources are hosted in {{region}}. <a>Learn more</a>',
|
tenant_region_tip: 'Your tenant resources are hosted in {{region}}. <a>Learn more</a>',
|
||||||
environment_tag_development: 'Dev',
|
environment_tag_development: 'Dev',
|
||||||
environment_tag_production: 'Prod',
|
environment_tag_production: 'Prod',
|
||||||
|
@ -46,8 +46,7 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Create tenant',
|
title: 'Create tenant',
|
||||||
subtitle:
|
subtitle: 'Create a new tenant that has isolated resources and users.',
|
||||||
'Create a new tenant that has isolated resources and users. Data region and tenant types can’t be modified after creation.',
|
|
||||||
tenant_usage_purpose: 'What do you want to use this tenant for?',
|
tenant_usage_purpose: 'What do you want to use this tenant for?',
|
||||||
development_description:
|
development_description:
|
||||||
"For testing only and shouldn't be used in production. No subscription is required.",
|
"For testing only and shouldn't be used in production. No subscription is required.",
|
||||||
|
@ -59,6 +58,7 @@ const tenants = {
|
||||||
tenant_created: 'Tenant created successfully.',
|
tenant_created: 'Tenant created successfully.',
|
||||||
invitation_failed:
|
invitation_failed:
|
||||||
'Some invitation failed to send. Please try again in Settings -> Members later.',
|
'Some invitation failed to send. Please try again in Settings -> Members later.',
|
||||||
|
tenant_type_description: 'This cannot be changed after creation.',
|
||||||
},
|
},
|
||||||
dev_tenant_migration: {
|
dev_tenant_migration: {
|
||||||
title: 'You can now try our Pro features for free by creating a new "Development tenant"!',
|
title: 'You can now try our Pro features for free by creating a new "Development tenant"!',
|
||||||
|
|
|
@ -47,8 +47,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Crear inquilino',
|
title: 'Crear inquilino',
|
||||||
subtitle:
|
|
||||||
'Cree un nuevo inquilino que tenga recursos y usuarios aislados. La región de datos alojados y los tipos de inquilinos no se pueden modificar después de la creación.',
|
|
||||||
tenant_usage_purpose: '¿Para qué desea usar este inquilino?',
|
tenant_usage_purpose: '¿Para qué desea usar este inquilino?',
|
||||||
development_description:
|
development_description:
|
||||||
'Solo para pruebas y no debe usarse en producción. No se requiere suscripción.',
|
'Solo para pruebas y no debe usarse en producción. No se requiere suscripción.',
|
||||||
|
|
|
@ -47,8 +47,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Créer un locataire',
|
title: 'Créer un locataire',
|
||||||
subtitle:
|
|
||||||
"Créez un nouveau locataire disposant de ressources et d'utilisateurs isolés. Les régions de données hébergées et les types de locataires ne peuvent pas être modifiés après la création.",
|
|
||||||
tenant_usage_purpose: 'Dans quel but souhaitez-vous utiliser ce locataire?',
|
tenant_usage_purpose: 'Dans quel but souhaitez-vous utiliser ce locataire?',
|
||||||
development_description:
|
development_description:
|
||||||
"Uniquement pour les tests et ne devrait pas être utilisé en production. Aucune souscription n'est requise.",
|
"Uniquement pour les tests et ne devrait pas être utilisé en production. Aucune souscription n'est requise.",
|
||||||
|
|
|
@ -48,8 +48,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Crea nuovo inquilino',
|
title: 'Crea nuovo inquilino',
|
||||||
subtitle:
|
|
||||||
'Crea un nuovo inquilino con risorse e utenti isolati. Le regioni dei dati ospitati e i tipi di inquilino non possono essere modificati dopo la creazione.',
|
|
||||||
tenant_usage_purpose: 'Per cosa desideri utilizzare questo inquilino?',
|
tenant_usage_purpose: 'Per cosa desideri utilizzare questo inquilino?',
|
||||||
development_description:
|
development_description:
|
||||||
'Solo per scopi di test e non dovrebbe essere utilizzato in produzione. Non è richiesto alcun abbonamento.',
|
'Solo per scopi di test e non dovrebbe essere utilizzato in produzione. Non è richiesto alcun abbonamento.',
|
||||||
|
|
|
@ -45,8 +45,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'テナントを作成する',
|
title: 'テナントを作成する',
|
||||||
subtitle:
|
|
||||||
'分離されたリソースとユーザーを持つ新しいテナントを作成します。データがホストされる地域とテナントの種類は作成後に変更できません。',
|
|
||||||
tenant_usage_purpose: 'このテナントを使用する目的は何ですか?',
|
tenant_usage_purpose: 'このテナントを使用する目的は何ですか?',
|
||||||
development_description:
|
development_description:
|
||||||
'テスト用であり、本番で使用すべきではありません。サブスクリプションは必要ありません。',
|
'テスト用であり、本番で使用すべきではありません。サブスクリプションは必要ありません。',
|
||||||
|
|
|
@ -44,8 +44,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: '테넌트 만들기',
|
title: '테넌트 만들기',
|
||||||
subtitle:
|
|
||||||
'분리된 리소스와 사용자를 가진 새 테넌트를 만듭니다. 데이터가 호스팅되는 지역 및 테넌트 유형은 생성 후에 수정할 수 없습니다.',
|
|
||||||
tenant_usage_purpose: '이 테넌트를 사용하는 목적은 무엇입니까?',
|
tenant_usage_purpose: '이 테넌트를 사용하는 목적은 무엇입니까?',
|
||||||
development_description:
|
development_description:
|
||||||
'테스트 용으로만 사용하고 프로덕션에서 사용하지 마십시오. 구독이 필요하지 않습니다.',
|
'테스트 용으로만 사용하고 프로덕션에서 사용하지 마십시오. 구독이 필요하지 않습니다.',
|
||||||
|
|
|
@ -47,8 +47,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Utwórz nowego najemcę',
|
title: 'Utwórz nowego najemcę',
|
||||||
subtitle:
|
|
||||||
'Utwórz nowego najemcę, który ma izolowane zasoby i użytkowników. Dane hostowanej regionu i typy najemców nie mogą być modyfikowane po utworzeniu.',
|
|
||||||
tenant_usage_purpose: 'Co chcesz zrobić z tym najemcą?',
|
tenant_usage_purpose: 'Co chcesz zrobić z tym najemcą?',
|
||||||
development_description:
|
development_description:
|
||||||
'Wyłącznie do testów i nie powinien być używany w produkcji. Nie jest wymagana subskrypcja.',
|
'Wyłącznie do testów i nie powinien być używany w produkcji. Nie jest wymagana subskrypcja.',
|
||||||
|
|
|
@ -47,8 +47,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Criar inquilino',
|
title: 'Criar inquilino',
|
||||||
subtitle:
|
|
||||||
'Crie um novo locatário que tenha recursos e usuários isolados. As regiões de dados hospedados e os tipos de locatário não podem ser modificados após a criação.',
|
|
||||||
tenant_usage_purpose: 'Para que você deseja usar este locatário?',
|
tenant_usage_purpose: 'Para que você deseja usar este locatário?',
|
||||||
development_description:
|
development_description:
|
||||||
'Apenas para testes e não deve ser usado em produção. Nenhuma assinatura é necessária.',
|
'Apenas para testes e não deve ser usado em produção. Nenhuma assinatura é necessária.',
|
||||||
|
|
|
@ -47,8 +47,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Criar inquilino',
|
title: 'Criar inquilino',
|
||||||
subtitle:
|
|
||||||
'Crie um novo inquilino que tenha recursos e utilizadores isolados. As regiões de dados hospedados e os tipos de inquilino não podem ser modificados após a criação.',
|
|
||||||
tenant_usage_purpose: 'Para que pretende utilizar este inquilino?',
|
tenant_usage_purpose: 'Para que pretende utilizar este inquilino?',
|
||||||
development_description:
|
development_description:
|
||||||
'Apenas para testes e não deve ser usado em produção. Não é necessário nenhum plano de subscrição.',
|
'Apenas para testes e não deve ser usado em produção. Não é necessário nenhum plano de subscrição.',
|
||||||
|
|
|
@ -46,8 +46,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Создать арендатора',
|
title: 'Создать арендатора',
|
||||||
subtitle:
|
|
||||||
'Создайте нового арендатора, чтобы разделить ресурсы и пользователей. Данные, размещенные в регионе, и типы арендаторов не могут быть изменены после создания.',
|
|
||||||
tenant_usage_purpose: 'Для чего вы хотите использовать этот арендатор?',
|
tenant_usage_purpose: 'Для чего вы хотите использовать этот арендатор?',
|
||||||
development_description:
|
development_description:
|
||||||
'Только для тестирования и не должно использоваться в производстве. Подписка не требуется.',
|
'Только для тестирования и не должно использоваться в производстве. Подписка не требуется.',
|
||||||
|
|
|
@ -46,8 +46,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: 'Kiracı Oluştur',
|
title: 'Kiracı Oluştur',
|
||||||
subtitle:
|
|
||||||
'İzole kaynaklara ve kullanıcılara sahip yeni bir kiracı oluşturun. Verilerin barındırıldığı bölge ve kiracı türleri oluşturulduktan sonra değiştirilemez.',
|
|
||||||
tenant_usage_purpose: 'Bu kiracıyı ne için kullanmak istiyorsunuz?',
|
tenant_usage_purpose: 'Bu kiracıyı ne için kullanmak istiyorsunuz?',
|
||||||
development_description:
|
development_description:
|
||||||
'Yalnızca test amacıyla ve üretimde kullanılmamalıdır. Abonelik gerekli değildir.',
|
'Yalnızca test amacıyla ve üretimde kullanılmamalıdır. Abonelik gerekli değildir.',
|
||||||
|
|
|
@ -41,7 +41,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: '创建租户',
|
title: '创建租户',
|
||||||
subtitle: '创建一个具有隔离资源和用户的新租户。数据托管的区域和租户类型在创建后无法修改。',
|
|
||||||
tenant_usage_purpose: '您想要使用此租户做什么?',
|
tenant_usage_purpose: '您想要使用此租户做什么?',
|
||||||
development_description: '仅用于测试,不应在生产环境中使用。不需要订阅。',
|
development_description: '仅用于测试,不应在生产环境中使用。不需要订阅。',
|
||||||
development_hint: '它具有所有专业功能,但有像登录横幅之类的限制。',
|
development_hint: '它具有所有专业功能,但有像登录横幅之类的限制。',
|
||||||
|
|
|
@ -41,7 +41,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: '創建租戶',
|
title: '創建租戶',
|
||||||
subtitle: '創建一個具有隔離資源和使用者的新租戶。數據托管的區域和租戶類型在創建後無法修改。',
|
|
||||||
tenant_usage_purpose: '您希望使用此租戶做什麼?',
|
tenant_usage_purpose: '您希望使用此租戶做什麼?',
|
||||||
development_description: '僅供測試使用,不應在生產中使用。無需訂閱。',
|
development_description: '僅供測試使用,不應在生產中使用。無需訂閱。',
|
||||||
development_hint: '它具有所有專業功能,但存在限制,例如登錄橫幅。',
|
development_hint: '它具有所有專業功能,但存在限制,例如登錄橫幅。',
|
||||||
|
|
|
@ -41,7 +41,6 @@ const tenants = {
|
||||||
},
|
},
|
||||||
create_modal: {
|
create_modal: {
|
||||||
title: '建立客戶',
|
title: '建立客戶',
|
||||||
subtitle: '創建一個具有隔離資源和用戶的新租戶。數據托管的區域和租戶類型在創建後無法修改。',
|
|
||||||
tenant_usage_purpose: '您希望將此租戶用於什麼目的?',
|
tenant_usage_purpose: '您希望將此租戶用於什麼目的?',
|
||||||
development_description: '僅供測試,不應在生產環境中使用。無需訂閱。',
|
development_description: '僅供測試,不應在生產環境中使用。無需訂閱。',
|
||||||
development_hint: '它擁有所有專業功能,但存在限制,如登入橫幅。',
|
development_hint: '它擁有所有專業功能,但存在限制,如登入橫幅。',
|
||||||
|
|
Loading…
Reference in a new issue