From d2f7c941672c1e002933ce037cd9ad5f95d765c8 Mon Sep 17 00:00:00 2001 From: Darcy Ye Date: Mon, 12 Jun 2023 11:48:07 +0800 Subject: [PATCH] feat(console): add tenant deletion card and delete modal (#4016) --- .../components/DeleteConfirmModal/index.tsx | 8 ++- .../DeleteCard/index.module.scss | 15 +++++ .../TenantBasicSettings/DeleteCard/index.tsx | 37 +++++++++++ .../DeleteModal/index.module.scss | 27 ++++++++ .../TenantBasicSettings/DeleteModal/index.tsx | 64 +++++++++++++++++++ .../TenantBasicSettings/index.tsx | 44 +++++++++++++ .../TenantBasicSettings/types.ts | 4 +- .../admin-console/tenant-settings.ts | 7 ++ .../de/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../en/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../es/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../fr/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../it/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../ja/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../ko/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../ru/translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 7 ++ .../translation/admin-console/tenants.ts | 10 +++ .../admin-console/tenant-settings.ts | 6 ++ .../translation/admin-console/tenants.ts | 9 +++ .../admin-console/tenant-settings.ts | 6 ++ .../translation/admin-console/tenants.ts | 9 +++ .../admin-console/tenant-settings.ts | 7 ++ .../translation/admin-console/tenants.ts | 9 +++ 37 files changed, 446 insertions(+), 3 deletions(-) create mode 100644 packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.module.scss create mode 100644 packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx create mode 100644 packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.module.scss create mode 100644 packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx diff --git a/packages/console/src/components/DeleteConfirmModal/index.tsx b/packages/console/src/components/DeleteConfirmModal/index.tsx index bccabafa7..9d6fad310 100644 --- a/packages/console/src/components/DeleteConfirmModal/index.tsx +++ b/packages/console/src/components/DeleteConfirmModal/index.tsx @@ -1,3 +1,4 @@ +import type { AdminConsoleKey } from '@logto/phrases'; import type { ReactNode } from 'react'; import { useState } from 'react'; @@ -13,6 +14,8 @@ type Props = { className?: string; onCancel: () => void; onConfirm: () => void; + title?: AdminConsoleKey; + confirmButtonText?: AdminConsoleKey; }; function DeleteConfirmModal({ @@ -24,6 +27,8 @@ function DeleteConfirmModal({ className, onCancel, onConfirm, + title, + confirmButtonText, }: Props) { const [input, setInput] = useState(''); const isConfirmBlocked = Boolean(expectedInput) && input !== expectedInput; @@ -33,8 +38,9 @@ function DeleteConfirmModal({ isOpen={isOpen} isLoading={isLoading} isConfirmButtonDisabled={isConfirmBlocked} - confirmButtonText="general.delete" + confirmButtonText={confirmButtonText ?? 'general.delete'} className={className} + title={title} onCancel={onCancel} onConfirm={onConfirm} > diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.module.scss b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.module.scss new file mode 100644 index 000000000..c0833584f --- /dev/null +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.module.scss @@ -0,0 +1,15 @@ +@use '@/scss/underscore' as _; + +.deletionButtonContainer { + display: flex; + align-items: center; + border: 1px solid var(--color-divider); + border-radius: _.unit(2); + padding: _.unit(4); + + .description { + flex: 1; + margin-right: _.unit(2); + font: var(--font-body-2); + } +} diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx new file mode 100644 index 000000000..41599431a --- /dev/null +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx @@ -0,0 +1,37 @@ +import { adminTenantId, defaultTenantId } from '@logto/schemas'; +import { useTranslation } from 'react-i18next'; + +import Button from '@/components/Button'; +import FormCard from '@/components/FormCard'; +import FormField from '@/components/FormField'; + +import * as styles from './index.module.scss'; + +type Props = { + currentTenantId: string; + onClick: () => void; +}; + +function DeleteCard({ currentTenantId, onClick }: Props) { + const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); + + return ( + + +
+
+ {t('tenant_settings.deletion_card.tenant_deletion_description')} +
+
+
+
+ ); +} + +export default DeleteCard; diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.module.scss b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.module.scss new file mode 100644 index 000000000..b4ee156a8 --- /dev/null +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.module.scss @@ -0,0 +1,27 @@ +@use '@/scss/underscore' as _; + +.deleteConfirmModal { + > :not(:first-child) { + margin-top: _.unit(6); + } + + .content { + > p { + margin-bottom: _.unit(5); + } + } + + .description { + gap: _.unit(2); + font: var(--font-body-2); + } + + .bold { + font: var(--font-title-3); + } + + .highlight { + font: var(--font-label-2); + color: var(--color-primary-80); + } +} diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx new file mode 100644 index 000000000..52a0a11d5 --- /dev/null +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx @@ -0,0 +1,64 @@ +import { type TenantInfo } from '@logto/schemas'; +import classNames from 'classnames'; +import { useTranslation, Trans } from 'react-i18next'; + +import DeleteConfirmModal from '@/components/DeleteConfirmModal'; +import TextLink from '@/components/TextLink'; +import { contactEmailLink } from '@/consts'; + +import * as styles from './index.module.scss'; + +type Props = { + isOpen: boolean; + isLoading: boolean; + onClose: () => void; + onDelete: () => void; + tenant: Pick; +}; + +function DeleteModal({ isOpen, isLoading, onClose, onDelete, tenant }: Props) { + const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); + const { name, tag } = tenant; + + return ( + +
+

+ }}> + {t('tenants.delete_modal.description_line1', { + name, + tag, + })} + +

+

+ , + a: , + }} + > + {t('tenants.delete_modal.description_line2')} + +

+

+ }}> + {t('tenants.delete_modal.description_line3', { name })} + +

+
+
+ ); +} + +export default DeleteModal; diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx index f2b18a36f..05670f46e 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx @@ -10,6 +10,8 @@ import SubmitFormChangesActionBar from '@/components/SubmitFormChangesActionBar' import UnsavedChangesAlertModal from '@/components/UnsavedChangesAlertModal'; import useTenants from '@/hooks/use-tenants'; +import DeleteCard from './DeleteCard'; +import DeleteModal from './DeleteModal'; import ProfileForm from './ProfileForm'; import * as styles from './index.module.scss'; import { type TenantSettingsForm } from './types.js'; @@ -22,8 +24,11 @@ function TenantBasicSettings() { error: requestError, mutate, isLoading, + tenants, } = useTenants(); const [error, setError] = useState(); + const [isDeletionModalOpen, setIsDeletionModalOpen] = useState(false); + const [isDeleting, setIsDeleting] = useState(false); useEffect(() => { if (requestError) { @@ -33,6 +38,7 @@ function TenantBasicSettings() { const methods = useForm(); const { + watch, reset, handleSubmit, formState: { isDirty, isSubmitting }, @@ -72,6 +78,34 @@ function TenantBasicSettings() { await saveData({ name, tag }); }); + const onClickDeletionButton = () => { + setIsDeletionModalOpen(true); + }; + + const onDelete = async () => { + if (isDeleting) { + return; + } + + setIsDeleting(true); + try { + await cloudApi.delete(`/api/tenants/${currentTenantId}`); + setIsDeletionModalOpen(false); + await mutate(); + if (tenants?.[0]?.id) { + window.open(new URL(`/${tenants[0].id}`, window.location.origin).toString(), '_self'); + } + } catch (error: unknown) { + setError( + error instanceof Error + ? error + : new Error(JSON.stringify(error, Object.getOwnPropertyNames(error))) + ); + } finally { + setIsDeleting(false); + } + }; + if (isLoading) { return ; } @@ -87,6 +121,7 @@ function TenantBasicSettings() {
+
+ { + setIsDeletionModalOpen(false); + }} + onDelete={onDelete} + /> ); diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/types.ts b/packages/console/src/pages/TenantSettings/TenantBasicSettings/types.ts index 9bf3a69d2..c95a81269 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/types.ts +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/types.ts @@ -1,5 +1,5 @@ -import { type PatchTenant } from '@logto/schemas'; +import { type TenantInfo } from '@logto/schemas'; export type TenantSettingsForm = { - profile: Required; + profile: Pick; }; diff --git a/packages/phrases/src/locales/de/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/de/translation/admin-console/tenant-settings.ts index ab05f3ffe..51398ad66 100644 --- a/packages/phrases/src/locales/de/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/de/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Inszenierung', environment_tag_production: 'Produktion', }, + deletion_card: { + title: 'LÖSCHEN', + tenant_deletion: 'Mieter löschen', + tenant_deletion_description: + 'Wenn Sie Ihr Konto löschen, werden alle persönlichen Informationen, Benutzerdaten und Konfigurationen entfernt. Dieser Vorgang kann nicht rückgängig gemacht werden.', + tenant_deletion_button: 'Mieter löschen', + }, }; export default tenant_settings; 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 4bb821d5e..6eebbe4d8 100644 --- a/packages/phrases/src/locales/de/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/de/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Staging', environment_tag_production: 'Produktion', }, + delete_modal: { + title: 'Mieter löschen', + description_line1: + 'Möchten Sie Ihren Mieter "{{name}}" mit Umgebungssuffix-Tag "{{tag}}" wirklich löschen? Der Vorgang kann nicht rückgängig gemacht werden und führt zur dauerhaften Löschung aller Ihrer Daten und Kontoinformationen.', + description_line2: + 'Bevor Sie Ihr Konto löschen, können wir Ihnen vielleicht helfen. Kontaktieren Sie uns per E-Mail', + description_line3: + 'Wenn Sie fortfahren möchten, geben Sie bitte den Mieter-Namen "{{name}}" zur Bestätigung ein.', + delete_button: 'Dauerhaft löschen', + }, tenant_created: "Mieter '{{name}}' erfolgreich erstellt.", }; diff --git a/packages/phrases/src/locales/en/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/en/translation/admin-console/tenant-settings.ts index 8862817f9..2bb918729 100644 --- a/packages/phrases/src/locales/en/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/en/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Staging', environment_tag_production: 'Production', }, + deletion_card: { + title: 'DELETE', + tenant_deletion: 'Delete tenant', + tenant_deletion_description: + 'Deleting your account will remove all of your personal information, user data, and configuration. This action cannot be undone.', + tenant_deletion_button: 'Delete tenant', + }, }; export default tenant_settings; 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 940a2e310..91ce82c3f 100644 --- a/packages/phrases/src/locales/en/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/en/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Staging', environment_tag_production: 'Production', }, + delete_modal: { + title: 'Delete tenant', + description_line1: + 'Are you sure you want to delete your tenant "{{name}}" with environment suffix tag "{{tag}}"? This action cannot be undo, and will result in the permanent deletion of all your data and account information.', + description_line2: + 'Before deleting account, maybe we can help you. Contact us via Email', + description_line3: + 'If you would like to proceed, please enter the tenant name "{{name}}" to confirm.', + delete_button: 'Permanently delete', + }, tenant_created: "Tenant '{{name}}' created successfully.", }; diff --git a/packages/phrases/src/locales/es/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/es/translation/admin-console/tenant-settings.ts index ad07aa680..249d3f18d 100644 --- a/packages/phrases/src/locales/es/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/es/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Puesta en escena', environment_tag_production: 'Producción', }, + deletion_card: { + title: 'ELIMINAR', + tenant_deletion: 'Eliminar inquilino', + tenant_deletion_description: + 'La eliminación de su cuenta eliminará toda su información personal, datos de usuario y configuración. Esta acción no se puede deshacer.', + tenant_deletion_button: 'Eliminar inquilino', + }, }; export default tenant_settings; 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 6f0ac1164..31cd70abf 100644 --- a/packages/phrases/src/locales/es/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/es/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Puesta en escena', environment_tag_production: 'Producción', }, + delete_modal: { + title: 'Eliminar inquilino', + description_line1: + '¿Está seguro de que desea eliminar su inquilino "{{name}}" con etiqueta de sufijo de entorno"{{tag}}"? Esta acción no se puede deshacer y resultará en la eliminación permanente de todos sus datos e información de cuenta.', + description_line2: + 'Antes de eliminar la cuenta, quizás podamos ayudarlo. Contáctenos por correo electrónico', + description_line3: + 'Si desea continuar, ingrese el nombre del inquilino "{{name}}" para confirmar.', + delete_button: 'Eliminar permanentemente', + }, tenant_created: "El inquilino '{{name}}' se ha creado correctamente.", }; diff --git a/packages/phrases/src/locales/fr/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/fr/translation/admin-console/tenant-settings.ts index 1262883aa..676917bac 100644 --- a/packages/phrases/src/locales/fr/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/fr/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Mise en scène', environment_tag_production: 'Production', }, + deletion_card: { + title: 'SUPPRIMER', + tenant_deletion: 'Supprimer le locataire', + tenant_deletion_description: + "La suppression de votre compte entraînera la suppression de toutes vos informations personnelles, données d'utilisateur et configuration. Cette action est irréversible.", + tenant_deletion_button: 'Supprimer le locataire', + }, }; export default tenant_settings; 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 5221d56fa..e3479235b 100644 --- a/packages/phrases/src/locales/fr/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/fr/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Mise en scène', environment_tag_production: 'Production', }, + delete_modal: { + title: 'Supprimer le locataire', + description_line1: + 'Voulez-vous vraiment supprimer votre locataire "{{name}}" avec le tag de suffixe d\'environnement "{{tag}}" ? Cette action est irréversible et entraînera la suppression permanente de toutes vos données et informations de compte.', + description_line2: + 'Avant de supprimer le compte, peut-être pouvons-nous vous aider. Contactez-nous par e-mail', + description_line3: + 'Si vous souhaitez continuer, veuillez entrer le nom du locataire "{{name}}" pour confirmer.', + delete_button: 'Supprimer définitivement', + }, tenant_created: "Locataire '{{name}}' créé avec succès.", }; diff --git a/packages/phrases/src/locales/it/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/it/translation/admin-console/tenant-settings.ts index eaa63a76e..6f21cbde2 100644 --- a/packages/phrases/src/locales/it/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/it/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Staging', environment_tag_production: 'Produzione', }, + deletion_card: { + title: 'ELIMINA', + tenant_deletion: 'Elimina tenant', + tenant_deletion_description: + "L'eliminazione del tuo account rimuoverà tutte le tue informazioni personali, i dati dell'utente e la configurazione. Questa azione non può essere annullata.", + tenant_deletion_button: 'Elimina tenant', + }, }; export default tenant_settings; 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 8632f8104..7aeb04c66 100644 --- a/packages/phrases/src/locales/it/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/it/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Sperimentale', environment_tag_production: 'Produzione', }, + delete_modal: { + title: 'Elimina tenant', + description_line1: + 'Sei sicuro di voler eliminare il tuo tenant "{{name}}" con il tag di suffisso dell\'ambiente "{{tag}}"? Questa azione non può essere annullata e comporterà l\'eliminazione permanente di tutti i tuoi dati e le informazioni dell\'account.', + description_line2: + "Prima di eliminare l'account, forse possiamo aiutarti. Contattaci via e-mail", + description_line3: + 'Se vuoi procedere, inserisci il nome del tenant "{{name}}" per confermare.', + delete_button: 'Elimina definitivamente', + }, tenant_created: "Tenant '{{name}}' creato con successo.", }; diff --git a/packages/phrases/src/locales/ja/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/ja/translation/admin-console/tenant-settings.ts index c85ff71f5..4d1a09c45 100644 --- a/packages/phrases/src/locales/ja/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/ja/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'ステージング', environment_tag_production: 'プロダクション', }, + deletion_card: { + title: '削除', + tenant_deletion: 'テナントの削除', + tenant_deletion_description: + 'アカウントを削除すると、すべての個人情報、ユーザーデータ、および構成が削除されます。この操作は元に戻すことはできません。', + tenant_deletion_button: 'テナントを削除する', + }, }; export default tenant_settings; 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 c875855f4..6cde12ce9 100644 --- a/packages/phrases/src/locales/ja/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/ja/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'ステージング', environment_tag_production: 'プロダクション', }, + delete_modal: { + title: 'テナントを削除します', + description_line1: + '"{{name}}" というテナント ("{{tag}}" の環境タグを持つ) を削除してもよろしいですか? このアクションは元に戻せません。これにより、すべてのデータとアカウント情報が永久に削除されます。', + description_line2: + 'アカウントの削除前に、お手伝いできるかもしれません。 メールでお問い合わせください。', + description_line3: + '続行する場合は、テナント名 "{{name}}" を入力して確認してください。', + delete_button: '完全に削除する', + }, tenant_created: "{{name}}'のテナントが正常に作成されました。", }; diff --git a/packages/phrases/src/locales/ko/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/ko/translation/admin-console/tenant-settings.ts index 6ca64a00e..d6a41659b 100644 --- a/packages/phrases/src/locales/ko/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/ko/translation/admin-console/tenant-settings.ts @@ -16,6 +16,13 @@ const tenant_settings = { environment_tag_staging: '스테이징', environment_tag_production: '프로덕션', }, + deletion_card: { + title: '삭제', + tenant_deletion: '테넌트 삭제', + tenant_deletion_description: + '계정을 삭제하면 개인 정보, 사용자 데이터 및 구성이 모두 제거됩니다. 이 작업은 실행 취소할 수 없습니다.', + tenant_deletion_button: '테넌트 삭제', + }, }; export default tenant_settings; 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 f9cc06d74..2f1bd8de4 100644 --- a/packages/phrases/src/locales/ko/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/ko/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: '스테이징', environment_tag_production: '프로덕션', }, + delete_modal: { + title: '테넌트 삭제', + description_line1: + '환경 접미사 "{{tag}}"이(가) 붙은 "{{name}}" 테넌트를 삭제하시겠습니까? 이 작업은 실행 취소할 수 없으며, 모든 데이터 및 계정 정보가 영구적으로 삭제됩니다.', + description_line2: + '계정을 삭제하기 전에 도움이 필요할 수 있습니다. 이메일로 연락해주시면 도움을 드리겠습니다.', + description_line3: + '삭제하려는 테넌트 이름 "{{name}}"을(를) 입력하여 확인하십시오.', + delete_button: '영구 삭제', + }, tenant_created: "테넌트 '{{name}}'가(이) 성공적으로 만들어졌습니다.", }; diff --git a/packages/phrases/src/locales/pl-pl/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/pl-pl/translation/admin-console/tenant-settings.ts index 3b0e9f351..6e430fd42 100644 --- a/packages/phrases/src/locales/pl-pl/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/pl-pl/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Staging', environment_tag_production: 'Produkcja', }, + deletion_card: { + title: 'USUWANIE', + tenant_deletion: 'Usuń najemcę', + tenant_deletion_description: + 'Usunięcie twojego konta spowoduje usunięcie wszystkich twoich danych osobowych, danych użytkownika i konfiguracji. Ta operacja jest nieodwracalna.', + tenant_deletion_button: 'Usuń najemcę', + }, }; export default tenant_settings; 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 77483d8b5..256dec034 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 @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Staging', environment_tag_production: 'Produkcja', }, + delete_modal: { + title: 'Usuń najemcę', + description_line1: + 'Czy na pewno chcesz usunąć najemcę "{{name}}" z tagiem sufiksu środowiska "{{tag}}"? Ta operacja jest nieodwracalna i spowoduje trwałe usunięcie wszystkich twoich danych i informacji konta.', + description_line2: + 'Przed usunięciem konta, może chcemy Ci pomóc. Skontaktuj się z nami przez e-mail', + description_line3: + 'Jeśli chcesz kontynuować, wprowadź nazwę najemcy "{{name}}" w celu potwierdzenia.', + delete_button: 'Usuń na stałe', + }, tenant_created: "Najemca '{{name}}' utworzony pomyślnie.", }; diff --git a/packages/phrases/src/locales/pt-br/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/pt-br/translation/admin-console/tenant-settings.ts index 9ea6300ce..240a68331 100644 --- a/packages/phrases/src/locales/pt-br/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/pt-br/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Teste', environment_tag_production: 'Produção', }, + deletion_card: { + title: 'EXCLUIR', + tenant_deletion: 'Excluir locatário', + tenant_deletion_description: + 'A exclusão da sua conta removerá todas as suas informações pessoais, dados de usuário e configurações. Essa ação não pode ser desfeita.', + tenant_deletion_button: 'Excluir locatário', + }, }; export default tenant_settings; 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 7cf210900..1ff0a91a1 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 @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Staging', environment_tag_production: 'Produção', }, + delete_modal: { + title: 'Excluir locatário', + description_line1: + 'Tem certeza que deseja excluir seu locatário "{{name}}" com a etiqueta de sufixo de ambiente "{{tag}}"? Esta ação não pode ser desfeita e resultará na exclusão permanente de todos os seus dados e informações de conta.', + description_line2: + 'Antes de excluir a conta, podemos ajudá-lo. Entre em contato conosco por e-mail', + description_line3: + 'Se você deseja continuar, digite o nome do locatário "{{name}}" para confirmar.', + delete_button: 'Excluir permanentemente', + }, tenant_created: "Inquilino '{{name}}' criado com sucesso.", }; diff --git a/packages/phrases/src/locales/pt-pt/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/pt-pt/translation/admin-console/tenant-settings.ts index 8703ba1c9..a5e17c543 100644 --- a/packages/phrases/src/locales/pt-pt/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/pt-pt/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Staging', environment_tag_production: 'Produção', }, + deletion_card: { + title: 'ELIMINAR', + tenant_deletion: 'Eliminar inquilino', + tenant_deletion_description: + 'A eliminação da sua conta removerá todas as suas informações pessoais, dados de utilizador e configuração. Esta ação não pode ser desfeita.', + tenant_deletion_button: 'Eliminar inquilino', + }, }; export default tenant_settings; 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 c04022950..70efe18f8 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 @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Staging', environment_tag_production: 'Produção', }, + delete_modal: { + title: 'Eliminar inquilino', + description_line1: + 'Tem a certeza de que pretende eliminar o seu inquilino "{{name}}" com a etiqueta de sufixo de ambiente "{{tag}}"? Esta ação não pode ser desfeita e resultará na eliminação permanente de todos os seus dados e informações da conta.', + description_line2: + 'Antes de eliminar a conta, podemos ajudá-lo. Contacte-nos por email', + description_line3: + 'Se desejar continuar, introduza o nome do inquilino "{{name}}" para confirmar.', + delete_button: 'Eliminar permanentemente', + }, tenant_created: "Inquilino '{{name}}' criado com sucesso.", }; diff --git a/packages/phrases/src/locales/ru/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/ru/translation/admin-console/tenant-settings.ts index 2c63e5a9d..43beebaea 100644 --- a/packages/phrases/src/locales/ru/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/ru/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Стадия', environment_tag_production: 'Производство', }, + deletion_card: { + title: 'УДАЛИТЬ', + tenant_deletion: 'Удаление арендатора', + tenant_deletion_description: + 'Удаление вашей учетной записи приведет к удалению всех ваших личных данных, данных пользователя и настроек. Это действие нельзя отменить.', + tenant_deletion_button: 'Удалить арендатора', + }, }; export default tenant_settings; 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 8e23f6217..ee4c63a9b 100644 --- a/packages/phrases/src/locales/ru/translation/admin-console/tenants.ts +++ b/packages/phrases/src/locales/ru/translation/admin-console/tenants.ts @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Стадия', environment_tag_production: 'Производство', }, + delete_modal: { + title: 'Удалить арендатора', + description_line1: + 'Вы уверены, что хотите удалить своего арендатора "{{name}}" с меткой суффикса окружения "{{tag}}"? Это действие нельзя отменить, и приведет к безвозвратному удалению всех ваших данных и информации об учетной записи.', + description_line2: + 'Перед удалением учетной записи мы можем вам помочь. Свяжитесь с нами по электронной почте', + description_line3: + 'Если вы хотите продолжить, введите название арендатора "{{name}}" для подтверждения.', + delete_button: 'Навсегда удалить', + }, tenant_created: "Арендатор '{{name}}' успешно создан.", }; diff --git a/packages/phrases/src/locales/tr-tr/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/tr-tr/translation/admin-console/tenant-settings.ts index 497158e1e..4ecc3cfaa 100644 --- a/packages/phrases/src/locales/tr-tr/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/tr-tr/translation/admin-console/tenant-settings.ts @@ -17,6 +17,13 @@ const tenant_settings = { environment_tag_staging: 'Staging', environment_tag_production: 'Üretim', }, + deletion_card: { + title: 'SİL', + tenant_deletion: 'Kiracıyı Sil', + tenant_deletion_description: + 'Hesabınızı silmek, tüm kişisel bilgilerinizi, kullanıcı verilerinizi ve yapılandırmalarınızı kaldıracaktır. Bu işlem geri alınamaz.', + tenant_deletion_button: 'Kiracıyı Sil', + }, }; export default tenant_settings; 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 076140e07..f1ba15629 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 @@ -12,6 +12,16 @@ const tenants = { environment_tag_staging: 'Daha Yüksek Birlik', environment_tag_production: 'Üretim', }, + delete_modal: { + title: 'Kiracıyı Sil', + description_line1: + 'Ortam etiketi "{{tag}}" olan "{{name}}" kiracınızı silmek istediğinizden emin misiniz? Bu işlem geri alınamaz ve tüm verilerinizin ve hesap bilgilerinizin kalıcı olarak silinmesine neden olur.', + description_line2: + 'Hesabınızı silmeden önce size yardımcı olabiliriz. E-posta yoluyla bize ulaşın', + description_line3: + 'Devam etmek isterseniz, "{{name}}" kiracı adını onaylamak için yazın.', + delete_button: 'Kalıcı olarak sil', + }, tenant_created: "Kiracı '{{name}}' başarıyla oluşturuldu.", }; diff --git a/packages/phrases/src/locales/zh-cn/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/zh-cn/translation/admin-console/tenant-settings.ts index b8e7762be..f1b271672 100644 --- a/packages/phrases/src/locales/zh-cn/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/zh-cn/translation/admin-console/tenant-settings.ts @@ -15,6 +15,12 @@ const tenant_settings = { environment_tag_staging: '暂存', environment_tag_production: '生产', }, + deletion_card: { + title: '删除', + tenant_deletion: '删除租户', + tenant_deletion_description: '删除帐户将删除所有个人信息,用户数据和配置。此操作无法撤消。', + tenant_deletion_button: '删除租户', + }, }; export default tenant_settings; 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 1a1a9ce88..1562c3826 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 @@ -11,6 +11,15 @@ const tenants = { environment_tag_staging: '暂存环境', environment_tag_production: '生产环境', }, + delete_modal: { + title: '删除租户', + description_line1: + '您确定要删除 "{{name}}" 的环境标识符为"{{tag}}"的租户吗? 此操作无法撤消,并将导致永久删除所有数据和帐户信息。', + description_line2: + '在删除帐户之前,也许我们可以帮助您。通过电子邮件联系我们', + description_line3: '如果你想继续,请输入租户名 "{{name}}" 确认。', + delete_button: '永久删除', + }, tenant_created: "租户'{{name}}'创建成功。", }; diff --git a/packages/phrases/src/locales/zh-hk/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/zh-hk/translation/admin-console/tenant-settings.ts index 360c82a0e..35eb129db 100644 --- a/packages/phrases/src/locales/zh-hk/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/zh-hk/translation/admin-console/tenant-settings.ts @@ -16,6 +16,12 @@ const tenant_settings = { environment_tag_staging: '暂存', environment_tag_production: '生产', }, + deletion_card: { + title: '刪除', + tenant_deletion: '刪除租戶', + tenant_deletion_description: '刪除您的帳戶將刪除所有個人信息、用戶數據和配置。此操作無法撤銷。', + tenant_deletion_button: '刪除租戶', + }, }; export default tenant_settings; 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 7a3726b2d..8bb8cb7a5 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 @@ -11,6 +11,15 @@ const tenants = { environment_tag_staging: '測試', environment_tag_production: '生產', }, + delete_modal: { + title: '刪除租戶', + description_line1: + '您確定要刪除帶有環境標記 "{{tag}}" 的 "{{name}}" 租戶嗎?此操作無法撤銷,且會永久刪除您的所有數據和帳戶信息。', + description_line2: + '在刪除帳戶之前,也許我們可以為您提供幫助。通過電子郵件與我們聯繫', + description_line3: '如果您確定要繼續,請輸入租戶名稱 "{{name}}" 以進行確認。', + delete_button: '永久刪除', + }, tenant_created: '成功創建租戶「{{name}}」。', }; diff --git a/packages/phrases/src/locales/zh-tw/translation/admin-console/tenant-settings.ts b/packages/phrases/src/locales/zh-tw/translation/admin-console/tenant-settings.ts index e9f08a873..b541c99f7 100644 --- a/packages/phrases/src/locales/zh-tw/translation/admin-console/tenant-settings.ts +++ b/packages/phrases/src/locales/zh-tw/translation/admin-console/tenant-settings.ts @@ -15,6 +15,13 @@ const tenant_settings = { environment_tag_staging: '暫存', environment_tag_production: '生產', }, + deletion_card: { + title: '刪除', + tenant_deletion: '刪除租戶', + tenant_deletion_description: + '刪除您的帳戶將刪除所有個人資訊、使用者資料和配置。這個動作是無法撤銷的。', + tenant_deletion_button: '刪除租戶', + }, }; export default tenant_settings; 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 6abc54751..e7f7aa742 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 @@ -11,6 +11,15 @@ const tenants = { environment_tag_staging: '測試', environment_tag_production: '生產', }, + delete_modal: { + title: '刪除租戶', + description_line1: + '您是否確定要刪除具有環境後綴標籤 "{{tag}}" 的租戶 "{{name}}"?這個動作是無法撤銷的,並會永久刪除您的所有資料和帳戶資訊。', + description_line2: + '在刪除帳戶之前,也許我們能提供幫助。通過電子郵件與我們聯繫', + description_line3: '如果您確定要繼續,請輸入租戶名稱 "{{name}}" 以確認。', + delete_button: '永久刪除', + }, tenant_created: "租戶 '{{name}}' 成功建立。", };