0
Fork 0
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:
Gao Sun 2024-05-31 17:41:36 +08:00 committed by GitHub
parent 0c70d65c7b
commit 522dd02f44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 11 additions and 43 deletions

View file

@ -112,7 +112,7 @@ function CreateTenantModal({ isOpen, onClose }: Props) {
</FormField>
<FormField
title="tenants.settings.tenant_region"
description="tenants.settings.tenant_region_description"
tip={t('tenants.settings.tenant_region_description')}
>
<Controller
control={control}

View file

@ -66,7 +66,9 @@ function CreateTenant() {
const onCreateClick = handleSubmit(
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);
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.description}>{t('cloud.create_tenant.description')}</div>
<FormProvider {...methods}>
<FormField isRequired title="tenants.settings.tenant_name">
<FormField title="tenants.settings.tenant_name">
<TextInput
// eslint-disable-next-line jsx-a11y/no-autofocus
autoFocus
placeholder="My project"
disabled={isSubmitting}
{...register('name', { required: true })}
{...register('name')}
error={Boolean(errors.name)}
/>
</FormField>
<FormField
title="tenants.settings.tenant_region"
description="tenants.settings.tenant_region_description"
tip={t('tenants.settings.tenant_region_description')}
>
<Controller
control={control}

View file

@ -15,7 +15,6 @@ import Facebook from '../../assets/icons/social-facebook.svg';
import Kakao from '../../assets/icons/social-kakao.svg';
import Microsoft from '../../assets/icons/social-microsoft.svg';
import Oidc from '../../assets/icons/social-oidc.svg';
import Smal from '../../assets/icons/social-smal.svg';
import { Authentication } from './types';
@ -86,12 +85,4 @@ export const fakeSocialTargetOptions: MultiCardSelectorOption[] = [
isDisabled: true,
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',
},
];

View file

@ -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.',

View file

@ -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 cant 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>',
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 cant 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"!',

View file

@ -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.',

View file

@ -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.",

View file

@ -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.',

View file

@ -45,8 +45,6 @@ const tenants = {
},
create_modal: {
title: 'テナントを作成する',
subtitle:
'分離されたリソースとユーザーを持つ新しいテナントを作成します。データがホストされる地域とテナントの種類は作成後に変更できません。',
tenant_usage_purpose: 'このテナントを使用する目的は何ですか?',
development_description:
'テスト用であり、本番で使用すべきではありません。サブスクリプションは必要ありません。',

View file

@ -44,8 +44,6 @@ const tenants = {
},
create_modal: {
title: '테넌트 만들기',
subtitle:
'분리된 리소스와 사용자를 가진 새 테넌트를 만듭니다. 데이터가 호스팅되는 지역 및 테넌트 유형은 생성 후에 수정할 수 없습니다.',
tenant_usage_purpose: '이 테넌트를 사용하는 목적은 무엇입니까?',
development_description:
'테스트 용으로만 사용하고 프로덕션에서 사용하지 마십시오. 구독이 필요하지 않습니다.',

View file

@ -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.',

View file

@ -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.',

View file

@ -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.',

View file

@ -46,8 +46,6 @@ const tenants = {
},
create_modal: {
title: 'Создать арендатора',
subtitle:
'Создайте нового арендатора, чтобы разделить ресурсы и пользователей. Данные, размещенные в регионе, и типы арендаторов не могут быть изменены после создания.',
tenant_usage_purpose: 'Для чего вы хотите использовать этот арендатор?',
development_description:
'Только для тестирования и не должно использоваться в производстве. Подписка не требуется.',

View file

@ -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.',

View file

@ -41,7 +41,6 @@ const tenants = {
},
create_modal: {
title: '创建租户',
subtitle: '创建一个具有隔离资源和用户的新租户。数据托管的区域和租户类型在创建后无法修改。',
tenant_usage_purpose: '您想要使用此租户做什么?',
development_description: '仅用于测试,不应在生产环境中使用。不需要订阅。',
development_hint: '它具有所有专业功能,但有像登录横幅之类的限制。',

View file

@ -41,7 +41,6 @@ const tenants = {
},
create_modal: {
title: '創建租戶',
subtitle: '創建一個具有隔離資源和使用者的新租戶。數據托管的區域和租戶類型在創建後無法修改。',
tenant_usage_purpose: '您希望使用此租戶做什麼?',
development_description: '僅供測試使用,不應在生產中使用。無需訂閱。',
development_hint: '它具有所有專業功能,但存在限制,例如登錄橫幅。',

View file

@ -41,7 +41,6 @@ const tenants = {
},
create_modal: {
title: '建立客戶',
subtitle: '創建一個具有隔離資源和用戶的新租戶。數據托管的區域和租戶類型在創建後無法修改。',
tenant_usage_purpose: '您希望將此租戶用於什麼目的?',
development_description: '僅供測試,不應在生產環境中使用。無需訂閱。',
development_hint: '它擁有所有專業功能,但存在限制,如登入橫幅。',