mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
chore(toolkit,phrases,connector,console): use company info instead of company address (#4143)
This commit is contained in:
parent
cee1d0dd20
commit
cd5138fc5f
20 changed files with 89 additions and 79 deletions
|
@ -85,8 +85,8 @@ export const defaultMetadata: ConnectorMetadata = {
|
|||
type: ConnectorConfigFormItemType.Text,
|
||||
},
|
||||
{
|
||||
key: 'companyAddress',
|
||||
label: 'Company Address',
|
||||
key: 'companyInformation',
|
||||
label: 'Company Information',
|
||||
type: ConnectorConfigFormItemType.Text,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ const sendMessage =
|
|||
appSecret,
|
||||
resource,
|
||||
fromName,
|
||||
companyAddress,
|
||||
companyInformation,
|
||||
appLogo,
|
||||
} = config;
|
||||
const { to, type, payload } = data;
|
||||
|
@ -58,7 +58,9 @@ const sendMessage =
|
|||
headers: {
|
||||
Authorization: `${accessTokenResponse.token_type} ${accessTokenResponse.access_token}`,
|
||||
},
|
||||
json: { data: { to, type, payload: { ...payload, fromName, companyAddress, appLogo } } },
|
||||
json: {
|
||||
data: { to, type, payload: { ...payload, fromName, companyInformation, appLogo } },
|
||||
},
|
||||
timeout: { request: defaultTimeout },
|
||||
});
|
||||
} catch (error: unknown) {
|
||||
|
|
|
@ -3,3 +3,9 @@
|
|||
.imageFieldHeadline {
|
||||
margin-bottom: _.unit(2);
|
||||
}
|
||||
|
||||
.description {
|
||||
color: var(--color-text-secondary);
|
||||
font: var(--font-body-2);
|
||||
margin-top: _.unit(0.5);
|
||||
}
|
||||
|
|
|
@ -70,17 +70,17 @@ function EmailServiceConnectorForm({ extraInfo }: Props) {
|
|||
placeholder={t('connector_details.logto_email.from_name_placeholder')}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField
|
||||
title="connector_details.logto_email.company_address_field"
|
||||
tip={<DynamicT forKey="connector_details.logto_email.company_address_tip" />}
|
||||
>
|
||||
<FormField title="connector_details.logto_email.company_information_field">
|
||||
<TextInput
|
||||
{...register('formConfig.companyAddress', {
|
||||
{...register('formConfig.companyInformation', {
|
||||
validate: (value) => validateInput(conditionalString(value)),
|
||||
})}
|
||||
error={fromConfigErrors?.companyAddress?.message}
|
||||
placeholder={t('connector_details.logto_email.company_address_placeholder')}
|
||||
error={fromConfigErrors?.companyInformation?.message}
|
||||
placeholder={t('connector_details.logto_email.company_information_placeholder')}
|
||||
/>
|
||||
<div className={styles.description}>
|
||||
{t('connector_details.logto_email.company_information_description')}
|
||||
</div>
|
||||
</FormField>
|
||||
<FormField
|
||||
title="connector_details.logto_email.app_logo_field"
|
||||
|
|
|
@ -43,10 +43,10 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Passen Sie den Absendernamen für E-Mails an. Wenn es leer gelassen wird, wird "Verifizierung" als Standardname verwendet.',
|
||||
from_name_placeholder: 'Ihr Absendername',
|
||||
company_address_field: 'Firmenadresse',
|
||||
company_address_tip:
|
||||
'Die Anzeige der Firmenadresse und der Postleitzahl am Ende von E-Mails verbessert die Authentizität, bietet Kontaktinformationen und stellt die Einhaltung sicher.',
|
||||
company_address_placeholder: 'Ihre Firmenadresse',
|
||||
company_information_field: 'Firmeninformationen',
|
||||
company_information_description:
|
||||
'Zeigen Sie den Firmennamen, die Adresse oder die Postleitzahl am Ende der E-Mails an, um die Authentizität zu erhöhen.',
|
||||
company_information_placeholder: 'Die grundlegenden Informationen Ihres Unternehmens',
|
||||
app_logo_field: 'App-Logo',
|
||||
app_logo_tip:
|
||||
'Zeigen Sie Ihr Markenlogo oben in E-Mails an. Verwenden Sie dasselbe Bild für den hellen und den dunklen Modus.',
|
||||
|
|
|
@ -43,10 +43,10 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Customize the sender name for emails. If left empty, “Verification” will be used as the default name.',
|
||||
from_name_placeholder: 'Your sender name',
|
||||
company_address_field: 'Company address',
|
||||
company_address_tip:
|
||||
'Displaying company address and zip code in the bottom of emails enhances authenticity, provides contact information, and ensures compliance.',
|
||||
company_address_placeholder: 'Your company address',
|
||||
company_information_field: 'Company information',
|
||||
company_information_description:
|
||||
'Display your company name, address, or zip code in the bottom of emails to enhance authenticity.',
|
||||
company_information_placeholder: "Your company's basic information",
|
||||
app_logo_field: 'App Logo',
|
||||
app_logo_tip:
|
||||
'Display your brand logo in the top of emails. Use the same image for both light mode and dark mode.',
|
||||
|
|
|
@ -43,13 +43,13 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Personalice el nombre del remitente para los correos electrónicos. Si se deja en blanco, se utilizará "Verificación" como nombre predeterminado.',
|
||||
from_name_placeholder: 'Su nombre de remitente',
|
||||
company_address_field: 'Dirección de la empresa',
|
||||
company_address_tip:
|
||||
'Mostrar la dirección de la empresa y el código postal en la parte inferior de los correos electrónicos mejora la autenticidad, proporciona información de contacto y garantiza el cumplimiento.',
|
||||
company_address_placeholder: 'La dirección de su empresa',
|
||||
company_information_field: 'Información de la empresa',
|
||||
company_information_description:
|
||||
'Muestre el nombre de su empresa, dirección o código postal en la parte inferior de los correos electrónicos para mejorar la autenticidad.',
|
||||
company_information_placeholder: 'Información básica de su empresa',
|
||||
app_logo_field: 'Logotipo de la aplicación',
|
||||
app_logo_tip:
|
||||
'Muestre el logotipo de su marca en la parte superior de los correos electrónicos. Use la misma imagen para el modo claro y oscuro.',
|
||||
'Muestre el logotipo de su marca en la parte superior de los correos electrónicos. Utilice la misma imagen para el modo claro y oscuro.',
|
||||
urls_not_allowed: 'Las URL no están permitidas',
|
||||
test_notes: 'Logto utiliza la plantilla "Generic" para realizar pruebas.',
|
||||
},
|
||||
|
|
|
@ -43,10 +43,10 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Personnalisez le nom de l’expéditeur pour les emails. Si vous le laissez vide, "Vérification" sera utilisé comme nom par défaut.',
|
||||
from_name_placeholder: 'Votre nom d’expéditeur',
|
||||
company_address_field: 'Adresse de l’entreprise',
|
||||
company_address_tip:
|
||||
'L’affichage de l’adresse de l’entreprise et du code postal en bas des emails améliore l’authenticité, fournit des informations de contact et garantit la conformité.',
|
||||
company_address_placeholder: 'L’adresse de votre entreprise',
|
||||
company_information_field: 'Informations sur la société',
|
||||
company_information_description:
|
||||
"Affichez le nom de votre entreprise, votre adresse ou votre code postal en bas des emails pour renforcer l'authenticité.",
|
||||
company_information_placeholder: 'Les informations de base de votre entreprise',
|
||||
app_logo_field: 'Logo de l’application',
|
||||
app_logo_tip:
|
||||
'Affichez le logo de votre marque en haut des emails. Utilisez la même image pour le mode clair et le mode sombre.',
|
||||
|
|
|
@ -43,10 +43,10 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Personalizza il nome del mittente per le email. Se lasciato vuoto, verrà utilizzato "Verifica" come nome predefinito.',
|
||||
from_name_placeholder: 'Il tuo nome mittente',
|
||||
company_address_field: 'Indirizzo aziendale',
|
||||
company_address_tip:
|
||||
"La visualizzazione dell'indirizzo e del codice postale dell'azienda in fondo alle email migliora l'autenticità, fornisce informazioni di contatto e garantisce la conformità.",
|
||||
company_address_placeholder: 'Il tuo indirizzo aziendale',
|
||||
company_information_field: 'Informazioni aziendali',
|
||||
company_information_description:
|
||||
"Mostra il nome dell'azienda, l'indirizzo o il codice postale in fondo alle email per migliorare l'autenticità.",
|
||||
company_information_placeholder: 'Le informazioni di base della tua azienda',
|
||||
app_logo_field: "Logo dell'app",
|
||||
app_logo_tip:
|
||||
'Mostra il logo del tuo marchio in cima alle email. Utilizza la stessa immagine per la modalità chiara e scura.',
|
||||
|
|
|
@ -43,10 +43,10 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'メールの送信元名をカスタマイズします。空白の場合、「Verification」がデフォールト名として使用されます。',
|
||||
from_name_placeholder: '送信元の名前を入力してください',
|
||||
company_address_field: '会社住所',
|
||||
company_address_tip:
|
||||
'メールの下部に会社住所と郵便番号を表示することで、信頼性を高め、連絡先情報を提供し、コンプライアンスを確保します。',
|
||||
company_address_placeholder: '会社の住所を入力してください',
|
||||
company_information_field: '企業情報',
|
||||
company_information_description:
|
||||
'メールの下部に会社名、住所、郵便番号などを表示して、真正性を高めます。',
|
||||
company_information_placeholder: '会社の基本情報を入力してください',
|
||||
app_logo_field: 'アプリのロゴ',
|
||||
app_logo_tip:
|
||||
'メールの上部にブランドロゴを表示します。ライトモードとダークモードの両方で同じ画像を使用してください。',
|
||||
|
|
|
@ -43,10 +43,10 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'이메일의 보내는 사람 이름을 사용자 정의합니다. 비워 두면 기본 이름으로 "Verification"이 사용됩니다.',
|
||||
from_name_placeholder: '보내는 사람 이름을 입력해주세요.',
|
||||
company_address_field: '회사 주소',
|
||||
company_address_tip:
|
||||
'이메일 하단에 회사 주소와 우편번호를 표시하면 신뢰성을 높이고 연락처 정보를 제공하며 규정 준수를 보장합니다.',
|
||||
company_address_placeholder: '당신의 회사 주소를 입력하세요.',
|
||||
company_information_field: '회사 정보',
|
||||
company_information_description:
|
||||
'이메일 하단에 회사 이름, 주소 또는 우편번호를 표시하여 신뢰성을 높입니다.',
|
||||
company_information_placeholder: '회사의 기본 정보',
|
||||
app_logo_field: '앱 로고',
|
||||
app_logo_tip:
|
||||
'이메일 상단에 브랜드 로고를 표시합니다. 라이트 모드와 다크 모드에 모두 동일한 이미지를 사용합니다.',
|
||||
|
|
|
@ -43,10 +43,10 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Dostosuj nazwę nadawcy dla wiadomości e-mail. Jeśli pozostawisz to pole puste, domyślnie użyta zostanie nazwa "Weryfikacja".',
|
||||
from_name_placeholder: 'Nazwa nadawcy',
|
||||
company_address_field: 'Adres firmy',
|
||||
company_address_tip:
|
||||
'Wyświetlanie adresu firmy i kodu pocztowego na dole wiadomości e-mail zwiększa autentyczność, zapewnia informacje kontaktowe i zapewnia zgodność.',
|
||||
company_address_placeholder: 'Adres firmy',
|
||||
company_information_field: 'Informacje o firmie',
|
||||
company_information_description:
|
||||
'Wyświetlaj nazwę firmy, adres lub kod pocztowy na dole wiadomości e-mail, aby zwiększyć autentyczność.',
|
||||
company_information_placeholder: 'Podstawowe informacje o Twojej firmie',
|
||||
app_logo_field: 'Logo aplikacji',
|
||||
app_logo_tip:
|
||||
'Wyświetlaj logo marki na górze wiadomości e-mail. Użyj tego samego obrazu zarówno dla trybu jasnego, jak i ciemnego.',
|
||||
|
|
|
@ -43,15 +43,15 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Personalize o nome do remetente para e-mails. Se deixado em branco, "Verificação" será usado como nome padrão.',
|
||||
from_name_placeholder: 'Seu nome de remetente',
|
||||
company_address_field: 'Endereço da empresa',
|
||||
company_address_tip:
|
||||
'Exibir o endereço da empresa e o código postal no final dos e-mails aumenta a autenticidade, fornece informações de contato e garante conformidade.',
|
||||
company_address_placeholder: 'O endereço da sua empresa',
|
||||
company_information_field: 'Informações da empresa',
|
||||
company_information_description:
|
||||
'Exiba o nome da sua empresa, endereço ou código postal no final dos e-mails para melhorar a autenticidade.',
|
||||
company_information_placeholder: 'Informações básicas da sua empresa',
|
||||
app_logo_field: 'Logotipo do aplicativo',
|
||||
app_logo_tip:
|
||||
'Exiba o logotipo da sua marca no topo dos e-mails. Use a mesma imagem para o modo claro e escuro.',
|
||||
urls_not_allowed: 'URLs não permitidas',
|
||||
test_notes: 'Logto utiliza o modelo "Generic" para testes.',
|
||||
test_notes: 'Logto utiliza o modelo "Genérico" para testes.',
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -43,13 +43,13 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Personalize o nome do remetente para e-mails. Se deixado em branco, "Verificação" será usado como nome padrão.',
|
||||
from_name_placeholder: 'Seu nome do remetente',
|
||||
company_address_field: 'Endereço da empresa',
|
||||
company_address_tip:
|
||||
'Exibir o endereço da empresa e o código postal no final dos e-mails aumenta a autenticidade, fornece informações de contato e garante conformidade.',
|
||||
company_address_placeholder: 'Seu endereço da empresa',
|
||||
app_logo_field: 'Logotipo do aplicativo',
|
||||
company_information_field: 'Informação da empresa',
|
||||
company_information_description:
|
||||
'Exiba o nome da sua empresa, endereço ou código postal no rodapé dos e-mails para aumentar a autenticidade.',
|
||||
company_information_placeholder: 'Informação básica da empresa',
|
||||
app_logo_field: 'Logotipo da aplicação',
|
||||
app_logo_tip:
|
||||
'Exiba o logotipo da sua marca no topo dos e-mails. Use a mesma imagem para o modo claro e escuro.',
|
||||
'Exiba o logotipo da sua marca no topo dos e-mails. Utilize a mesma imagem para o modo claro e escuro.',
|
||||
urls_not_allowed: 'Os URLs não são permitidos',
|
||||
test_notes: 'O Logto utiliza o modelo "Genérico" para os testes.',
|
||||
},
|
||||
|
|
|
@ -43,14 +43,14 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'Настройте имя отправителя для электронных писем. Если оставить пустым, будет использоваться "Подтверждение" в качестве имени по умолчанию.',
|
||||
from_name_placeholder: 'Введите имя отправителя здесь',
|
||||
company_address_field: 'Адрес компании',
|
||||
company_address_tip:
|
||||
'Отображение адреса компании и почтового индекса в нижней части электронных писем повышает подлинность, обеспечивает контактную информацию и обеспечивает соответствие.',
|
||||
company_address_placeholder: 'Введите адрес вашей компании здесь',
|
||||
company_information_field: 'Информация о компании',
|
||||
company_information_description:
|
||||
'Отображайте имя вашей компании, адрес или почтовый код внизу электронных писем, чтобы улучшить подлинность.',
|
||||
company_information_placeholder: 'Основная информация о вашей компании',
|
||||
app_logo_field: 'Логотип приложения',
|
||||
app_logo_tip:
|
||||
'Отображайте логотип вашего бренда в верхней части электронных писем. Используйте одно и то же изображение для светлого и темного режимов.',
|
||||
urls_not_allowed: 'URLs are not allowed',
|
||||
'Отобразите логотип вашего бренда в верхней части электронных писем. Используйте одно и то же изображение для светлого и темного режимов.',
|
||||
urls_not_allowed: 'URL-адреса не разрешены',
|
||||
test_notes: 'Logto использует шаблон "Общий" для тестирования.',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -43,14 +43,14 @@ const connector_details = {
|
|||
from_name_tip:
|
||||
'E-postalar için gönderen adını özelleştirin. Boş bırakılırsa, varsayılan ad olarak "Doğrulama" kullanılacaktır.',
|
||||
from_name_placeholder: 'Gönderen adınızı girin',
|
||||
company_address_field: 'Şirket adresi',
|
||||
company_address_tip:
|
||||
'E-postaların altında şirket adresi ve posta kodunu görüntülemek, otantikliği artırır, iletişim bilgileri sağlar ve uyumluluğu sağlar.',
|
||||
company_address_placeholder: 'Şirket adresinizi girin',
|
||||
company_information_field: 'Şirket bilgileri',
|
||||
company_information_description:
|
||||
'E-postaların alt kısmında şirket adınızı, adresinizi veya posta kodunuzu görüntüleyin.',
|
||||
company_information_placeholder: 'Şirketinizin temel bilgileri',
|
||||
app_logo_field: 'Uygulama Logosu',
|
||||
app_logo_tip:
|
||||
'E-postaların üstünde marka logosunu görüntüleyin. Aynı görüntüyü açık mod ve karanlık mod için kullanın.',
|
||||
urls_not_allowed: 'URLs are not allowed',
|
||||
urls_not_allowed: 'URLler izin verilmez',
|
||||
test_notes: 'Logto testler için "Generic" şablonunu kullanır.',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -40,10 +40,9 @@ const connector_details = {
|
|||
from_name_field: '发件人姓名',
|
||||
from_name_tip: '自定义电子邮件的发件人姓名。如果留空,则默认使用“Verification”作为名称。',
|
||||
from_name_placeholder: '发件人姓名',
|
||||
company_address_field: '公司地址',
|
||||
company_address_tip:
|
||||
'在电子邮件底部显示公司地址和邮政编码,增强真实性,提供联系信息并确保合规性。',
|
||||
company_address_placeholder: '公司地址',
|
||||
company_information_field: '公司信息',
|
||||
company_information_description: '在电子邮件底部显示您公司的名称、地址或邮编,以增强真实性。',
|
||||
company_information_placeholder: '你公司的基本信息',
|
||||
app_logo_field: '应用程序标志',
|
||||
app_logo_tip: '在电子邮件顶部显示您的品牌标志。在浅色模式和深色模式下使用相同的图像。',
|
||||
urls_not_allowed: '不允许使用 URL',
|
||||
|
|
|
@ -40,12 +40,12 @@ const connector_details = {
|
|||
from_name_field: '發件人姓名',
|
||||
from_name_tip: '自定義郵件發件人姓名。如果未填寫,將使用“驗證”作為默認姓名。',
|
||||
from_name_placeholder: '您的發送人姓名',
|
||||
company_address_field: '公司地址',
|
||||
company_address_tip: '在郵件底部顯示公司地址和郵政編碼,增強真實性,提供聯繫信息,確保合規性。',
|
||||
company_address_placeholder: '您的公司地址',
|
||||
company_information_field: '公司信息',
|
||||
company_information_description: '在郵件底部顯示您的公司名稱、地址或郵政編碼,以增強真實性。',
|
||||
company_information_placeholder: '您公司的基本信息',
|
||||
app_logo_field: '應用程序標誌',
|
||||
app_logo_tip: '在郵件頂部顯示您的品牌標誌。在淺色模式和深色模式下使用相同的圖像。',
|
||||
urls_not_allowed: 'URLs 不允許',
|
||||
urls_not_allowed: '不允許使用 URL',
|
||||
test_notes: 'Logto 使用 "通用" 模板進行測試。',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -40,9 +40,9 @@ const connector_details = {
|
|||
from_name_field: '寄件人姓名',
|
||||
from_name_tip: '自定義郵件發件人姓名。如果未填寫,將使用「驗證」作為默認姓名。',
|
||||
from_name_placeholder: '您的發件人姓名',
|
||||
company_address_field: '公司地址',
|
||||
company_address_tip: '在郵件底部顯示公司地址和郵政編碼,增強真實性,提供聯繫信息,確保合規性。',
|
||||
company_address_placeholder: '您的公司地址',
|
||||
company_information_field: '公司信息',
|
||||
company_information_description: '在郵件底部顯示您的公司名稱、地址或郵編,以提高真實性。',
|
||||
company_information_placeholder: '您的公司基本信息',
|
||||
app_logo_field: '應用程式標誌',
|
||||
app_logo_tip: '在郵件頂部顯示您的品牌標誌。在淺色模式和深色模式下使用相同的圖像。',
|
||||
urls_not_allowed: '不允許使用 URL',
|
||||
|
|
|
@ -219,9 +219,12 @@ export const emailServiceBrandingGuard = z
|
|||
fromName: z
|
||||
.string()
|
||||
.refine((address) => !urlRegEx.test(address), 'DO NOT include URL in the sender name!'),
|
||||
companyAddress: z
|
||||
companyInformation: z
|
||||
.string()
|
||||
.refine((address) => !urlRegEx.test(address), 'DO NOT include URL in the company address!'),
|
||||
.refine(
|
||||
(address) => !urlRegEx.test(address),
|
||||
'DO NOT include URL in the company information!'
|
||||
),
|
||||
appLogo: z.string().url(),
|
||||
})
|
||||
.partial();
|
||||
|
|
Loading…
Reference in a new issue