diff --git a/packages/connectors/connector-logto-email/src/constant.ts b/packages/connectors/connector-logto-email/src/constant.ts index 39f4356a9..99fa60c9a 100644 --- a/packages/connectors/connector-logto-email/src/constant.ts +++ b/packages/connectors/connector-logto-email/src/constant.ts @@ -85,8 +85,8 @@ export const defaultMetadata: ConnectorMetadata = { type: ConnectorConfigFormItemType.Text, }, { - key: 'companyAddress', - label: 'Company Address', + key: 'companyInformation', + label: 'Company Information', type: ConnectorConfigFormItemType.Text, }, { diff --git a/packages/connectors/connector-logto-email/src/index.ts b/packages/connectors/connector-logto-email/src/index.ts index bdef58e32..30cb2d115 100644 --- a/packages/connectors/connector-logto-email/src/index.ts +++ b/packages/connectors/connector-logto-email/src/index.ts @@ -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) { diff --git a/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.module.scss b/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.module.scss index d0233f195..83abf16b9 100644 --- a/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.module.scss +++ b/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.module.scss @@ -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); +} diff --git a/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx b/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx index 92770953e..5d168ea16 100644 --- a/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx @@ -70,17 +70,17 @@ function EmailServiceConnectorForm({ extraInfo }: Props) { placeholder={t('connector_details.logto_email.from_name_placeholder')} /> - } - > + 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')} /> +
+ {t('connector_details.logto_email.company_information_description')} +
!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();