mirror of
https://github.com/logto-io/logto.git
synced 2025-04-07 23:01:25 -05:00
feat(console,phrases): add inline notification if email domain not configured (#4986)
This commit is contained in:
parent
fad8872b31
commit
15ce9643e2
18 changed files with 98 additions and 1 deletions
|
@ -71,3 +71,9 @@
|
|||
outline-color: var(--color-focused-variant);
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
border-color: var(--color-error);
|
||||
font: var(--font-body-2);
|
||||
margin-top: _.unit(1);
|
||||
}
|
||||
|
|
|
@ -11,3 +11,7 @@
|
|||
color: var(--color-error);
|
||||
margin-top: _.unit(1);
|
||||
}
|
||||
|
||||
.inlineNotification {
|
||||
margin-top: _.unit(6);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import DetailsForm from '@/components/DetailsForm';
|
|||
import FormCard from '@/components/FormCard';
|
||||
import UnsavedChangesAlertModal from '@/components/UnsavedChangesAlertModal';
|
||||
import FormField from '@/ds-components/FormField';
|
||||
import InlineNotification from '@/ds-components/InlineNotification';
|
||||
import Select from '@/ds-components/Select';
|
||||
import TextInput from '@/ds-components/TextInput';
|
||||
import useApi from '@/hooks/use-api';
|
||||
|
@ -98,7 +99,7 @@ function Experience({ data, isDeleted, onUpdated }: Props) {
|
|||
clearErrors,
|
||||
handleSubmit,
|
||||
register,
|
||||
formState: { isDirty, isSubmitting, errors },
|
||||
formState: { defaultValues, isDirty, isSubmitting, errors },
|
||||
reset,
|
||||
} = formMethods;
|
||||
|
||||
|
@ -172,6 +173,11 @@ function Experience({ data, isDeleted, onUpdated }: Props) {
|
|||
error={errors.connectorName?.message}
|
||||
/>
|
||||
</FormField>
|
||||
{!defaultValues?.domains?.length && (
|
||||
<InlineNotification className={styles.inlineNotification} severity="alert">
|
||||
{t('enterprise_sso_details.configure_domain_field_info_text')}
|
||||
</InlineNotification>
|
||||
)}
|
||||
<FormField title="enterprise_sso_details.email_domain_field_name">
|
||||
<div className={styles.description}>
|
||||
{t('enterprise_sso_details.email_domain_field_description')}
|
||||
|
@ -179,6 +185,14 @@ function Experience({ data, isDeleted, onUpdated }: Props) {
|
|||
<Controller
|
||||
name="domains"
|
||||
control={control}
|
||||
rules={{
|
||||
validate: (value) => {
|
||||
if (value.length === 0) {
|
||||
return t('enterprise_sso_details.email_domain_field_required');
|
||||
}
|
||||
return true;
|
||||
},
|
||||
}}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<MultiInput
|
||||
values={value}
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -37,6 +37,9 @@ const enterprise_sso_details = {
|
|||
upload_idp_metadata_title: 'Upload IdP metadata',
|
||||
upload_idp_metadata_description: 'Configure the metadata copied from the identity provider.',
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
upload_saml_idp_metadata_info_text_xml:
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -71,6 +71,11 @@ const enterprise_sso_details = {
|
|||
/** UNTRANSLATED */
|
||||
upload_idp_metadata_button_text: 'Upload metadata XML file',
|
||||
/** UNTRANSLATED */
|
||||
configure_domain_field_info_text:
|
||||
'Add email domain to guide enterprise users to their identity provider for Single Sign-on.',
|
||||
/** UNTRANSLATED */
|
||||
email_domain_field_required: 'Email domain is required to enable enterprise SSO.',
|
||||
/** UNTRANSLATED */
|
||||
upload_saml_idp_metadata_info_text_url:
|
||||
'Paste the metadata URL from the identity provider to connect.',
|
||||
/** UNTRANSLATED */
|
||||
|
|
Loading…
Add table
Reference in a new issue