From 533632ad05b404b2ca27eec9844b698c1893c59e Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Fri, 31 May 2024 14:31:49 +0800 Subject: [PATCH] refactor: improve user experience --- .../console/src/components/CreateTenantModal/index.tsx | 2 +- .../src/onboarding/pages/CreateTenant/index.tsx | 10 ++++++---- .../src/onboarding/pages/SignInExperience/options.tsx | 9 --------- .../locales/de/translation/admin-console/tenants.ts | 2 -- .../locales/en/translation/admin-console/tenants.ts | 8 ++++---- .../locales/es/translation/admin-console/tenants.ts | 2 -- .../locales/fr/translation/admin-console/tenants.ts | 2 -- .../locales/it/translation/admin-console/tenants.ts | 2 -- .../locales/ja/translation/admin-console/tenants.ts | 2 -- .../locales/ko/translation/admin-console/tenants.ts | 2 -- .../locales/pl-pl/translation/admin-console/tenants.ts | 2 -- .../locales/pt-br/translation/admin-console/tenants.ts | 2 -- .../locales/pt-pt/translation/admin-console/tenants.ts | 2 -- .../locales/ru/translation/admin-console/tenants.ts | 2 -- .../locales/tr-tr/translation/admin-console/tenants.ts | 2 -- .../locales/zh-cn/translation/admin-console/tenants.ts | 1 - .../locales/zh-hk/translation/admin-console/tenants.ts | 1 - .../locales/zh-tw/translation/admin-console/tenants.ts | 1 - 18 files changed, 11 insertions(+), 43 deletions(-) diff --git a/packages/console/src/components/CreateTenantModal/index.tsx b/packages/console/src/components/CreateTenantModal/index.tsx index 60d2f66dd53..513a73b5fb8 100644 --- a/packages/console/src/components/CreateTenantModal/index.tsx +++ b/packages/console/src/components/CreateTenantModal/index.tsx @@ -112,7 +112,7 @@ function CreateTenantModal({ isOpen, onClose }: Props) { { - 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); toast.success(t('tenants.create_modal.tenant_created')); @@ -104,19 +106,19 @@ function CreateTenant() {
{t('cloud.create_tenant.title')}
{t('cloud.create_tenant.description')}
- + , - title: SAML, - value: 'fake-saml', - tag: 'cloud.sie.connectors.unlocked_later', - isDisabled: true, - disabledTip: 'cloud.sie.connectors.unlocked_later_tip', - }, ]; diff --git a/packages/phrases/src/locales/de/translation/admin-console/tenants.ts b/packages/phrases/src/locales/de/translation/admin-console/tenants.ts index 54e1aacc270..49ce09ccf23 100644 --- a/packages/phrases/src/locales/de/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/de/translation/admin-console/tenants.ts @@ -47,8 +47,6 @@ const tenants = { }, create_modal: { 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?', development_description: 'Nur für Tests und sollte nicht in der Produktion verwendet werden. Es ist kein Abonnement erforderlich.', diff --git a/packages/phrases/src/locales/en/translation/admin-console/tenants.ts b/packages/phrases/src/locales/en/translation/admin-console/tenants.ts index 3cb49a51331..eefd019ac98 100644 --- a/packages/phrases/src/locales/en/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/en/translation/admin-console/tenants.ts @@ -12,10 +12,10 @@ const tenants = { title: 'SETTINGS', description: 'Set the tenant name and view your data hosted region and tenant type.', tenant_id: 'Tenant ID', - tenant_name: 'Tenant Name', + tenant_name: 'Tenant name', tenant_region: 'Data region', 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}}. Learn more', environment_tag_development: 'Dev', environment_tag_production: 'Prod', @@ -46,8 +46,7 @@ const tenants = { }, create_modal: { title: 'Create tenant', - subtitle: - 'Create a new tenant that has isolated resources and users. Data region and tenant types can’t be modified after creation.', + subtitle: 'Create a new tenant that has isolated resources and users.', tenant_usage_purpose: 'What do you want to use this tenant for?', development_description: "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.', invitation_failed: 'Some invitation failed to send. Please try again in Settings -> Members later.', + tenant_type_description: 'This cannot be changed after creation.', }, dev_tenant_migration: { title: 'You can now try our Pro features for free by creating a new "Development tenant"!', diff --git a/packages/phrases/src/locales/es/translation/admin-console/tenants.ts b/packages/phrases/src/locales/es/translation/admin-console/tenants.ts index 82e755af64f..efdf14788cb 100644 --- a/packages/phrases/src/locales/es/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/es/translation/admin-console/tenants.ts @@ -47,8 +47,6 @@ const tenants = { }, create_modal: { 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?', development_description: 'Solo para pruebas y no debe usarse en producción. No se requiere suscripción.', diff --git a/packages/phrases/src/locales/fr/translation/admin-console/tenants.ts b/packages/phrases/src/locales/fr/translation/admin-console/tenants.ts index 65ca54935d6..d229050b292 100644 --- a/packages/phrases/src/locales/fr/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/fr/translation/admin-console/tenants.ts @@ -47,8 +47,6 @@ const tenants = { }, create_modal: { 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?', development_description: "Uniquement pour les tests et ne devrait pas être utilisé en production. Aucune souscription n'est requise.", diff --git a/packages/phrases/src/locales/it/translation/admin-console/tenants.ts b/packages/phrases/src/locales/it/translation/admin-console/tenants.ts index 5da05acbdfb..e37d58803a2 100644 --- a/packages/phrases/src/locales/it/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/it/translation/admin-console/tenants.ts @@ -48,8 +48,6 @@ const tenants = { }, create_modal: { 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?', development_description: 'Solo per scopi di test e non dovrebbe essere utilizzato in produzione. Non è richiesto alcun abbonamento.', diff --git a/packages/phrases/src/locales/ja/translation/admin-console/tenants.ts b/packages/phrases/src/locales/ja/translation/admin-console/tenants.ts index a684b30fc71..1ae4e02e135 100644 --- a/packages/phrases/src/locales/ja/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/ja/translation/admin-console/tenants.ts @@ -45,8 +45,6 @@ const tenants = { }, create_modal: { title: 'テナントを作成する', - subtitle: - '分離されたリソースとユーザーを持つ新しいテナントを作成します。データがホストされる地域とテナントの種類は作成後に変更できません。', tenant_usage_purpose: 'このテナントを使用する目的は何ですか?', development_description: 'テスト用であり、本番で使用すべきではありません。サブスクリプションは必要ありません。', diff --git a/packages/phrases/src/locales/ko/translation/admin-console/tenants.ts b/packages/phrases/src/locales/ko/translation/admin-console/tenants.ts index 5379c7e4b5d..6b8cae62c0f 100644 --- a/packages/phrases/src/locales/ko/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/ko/translation/admin-console/tenants.ts @@ -44,8 +44,6 @@ const tenants = { }, create_modal: { title: '테넌트 만들기', - subtitle: - '분리된 리소스와 사용자를 가진 새 테넌트를 만듭니다. 데이터가 호스팅되는 지역 및 테넌트 유형은 생성 후에 수정할 수 없습니다.', tenant_usage_purpose: '이 테넌트를 사용하는 목적은 무엇입니까?', development_description: '테스트 용으로만 사용하고 프로덕션에서 사용하지 마십시오. 구독이 필요하지 않습니다.', diff --git a/packages/phrases/src/locales/pl-pl/translation/admin-console/tenants.ts b/packages/phrases/src/locales/pl-pl/translation/admin-console/tenants.ts index e760595c008..6aba8d2dad5 100644 --- a/packages/phrases/src/locales/pl-pl/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/pl-pl/translation/admin-console/tenants.ts @@ -47,8 +47,6 @@ const tenants = { }, create_modal: { 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ą?', development_description: 'Wyłącznie do testów i nie powinien być używany w produkcji. Nie jest wymagana subskrypcja.', diff --git a/packages/phrases/src/locales/pt-br/translation/admin-console/tenants.ts b/packages/phrases/src/locales/pt-br/translation/admin-console/tenants.ts index 07ff31b8a5b..11914700561 100644 --- a/packages/phrases/src/locales/pt-br/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/pt-br/translation/admin-console/tenants.ts @@ -47,8 +47,6 @@ const tenants = { }, create_modal: { 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?', development_description: 'Apenas para testes e não deve ser usado em produção. Nenhuma assinatura é necessária.', diff --git a/packages/phrases/src/locales/pt-pt/translation/admin-console/tenants.ts b/packages/phrases/src/locales/pt-pt/translation/admin-console/tenants.ts index e8c14eba75d..64133366850 100644 --- a/packages/phrases/src/locales/pt-pt/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/pt-pt/translation/admin-console/tenants.ts @@ -47,8 +47,6 @@ const tenants = { }, create_modal: { 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?', development_description: 'Apenas para testes e não deve ser usado em produção. Não é necessário nenhum plano de subscrição.', diff --git a/packages/phrases/src/locales/ru/translation/admin-console/tenants.ts b/packages/phrases/src/locales/ru/translation/admin-console/tenants.ts index b926ae1ba6d..f58328d86de 100644 --- a/packages/phrases/src/locales/ru/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/ru/translation/admin-console/tenants.ts @@ -46,8 +46,6 @@ const tenants = { }, create_modal: { title: 'Создать арендатора', - subtitle: - 'Создайте нового арендатора, чтобы разделить ресурсы и пользователей. Данные, размещенные в регионе, и типы арендаторов не могут быть изменены после создания.', tenant_usage_purpose: 'Для чего вы хотите использовать этот арендатор?', development_description: 'Только для тестирования и не должно использоваться в производстве. Подписка не требуется.', diff --git a/packages/phrases/src/locales/tr-tr/translation/admin-console/tenants.ts b/packages/phrases/src/locales/tr-tr/translation/admin-console/tenants.ts index d0d5ae8eb8e..a05b6e39a6c 100644 --- a/packages/phrases/src/locales/tr-tr/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/tr-tr/translation/admin-console/tenants.ts @@ -46,8 +46,6 @@ const tenants = { }, create_modal: { 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?', development_description: 'Yalnızca test amacıyla ve üretimde kullanılmamalıdır. Abonelik gerekli değildir.', diff --git a/packages/phrases/src/locales/zh-cn/translation/admin-console/tenants.ts b/packages/phrases/src/locales/zh-cn/translation/admin-console/tenants.ts index 0d720d0a159..bae0d493421 100644 --- a/packages/phrases/src/locales/zh-cn/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/zh-cn/translation/admin-console/tenants.ts @@ -41,7 +41,6 @@ const tenants = { }, create_modal: { title: '创建租户', - subtitle: '创建一个具有隔离资源和用户的新租户。数据托管的区域和租户类型在创建后无法修改。', tenant_usage_purpose: '您想要使用此租户做什么?', development_description: '仅用于测试,不应在生产环境中使用。不需要订阅。', development_hint: '它具有所有专业功能,但有像登录横幅之类的限制。', diff --git a/packages/phrases/src/locales/zh-hk/translation/admin-console/tenants.ts b/packages/phrases/src/locales/zh-hk/translation/admin-console/tenants.ts index 9b27d1538e2..ca2dec9c4f1 100644 --- a/packages/phrases/src/locales/zh-hk/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/zh-hk/translation/admin-console/tenants.ts @@ -41,7 +41,6 @@ const tenants = { }, create_modal: { title: '創建租戶', - subtitle: '創建一個具有隔離資源和使用者的新租戶。數據托管的區域和租戶類型在創建後無法修改。', tenant_usage_purpose: '您希望使用此租戶做什麼?', development_description: '僅供測試使用,不應在生產中使用。無需訂閱。', development_hint: '它具有所有專業功能,但存在限制,例如登錄橫幅。', diff --git a/packages/phrases/src/locales/zh-tw/translation/admin-console/tenants.ts b/packages/phrases/src/locales/zh-tw/translation/admin-console/tenants.ts index 698d3d5d1ec..7670a3aa41e 100644 --- a/packages/phrases/src/locales/zh-tw/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/zh-tw/translation/admin-console/tenants.ts @@ -41,7 +41,6 @@ const tenants = { }, create_modal: { title: '建立客戶', - subtitle: '創建一個具有隔離資源和用戶的新租戶。數據托管的區域和租戶類型在創建後無法修改。', tenant_usage_purpose: '您希望將此租戶用於什麼目的?', development_description: '僅供測試,不應在生產環境中使用。無需訂閱。', development_hint: '它擁有所有專業功能,但存在限制,如登入橫幅。',