mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
refactor(console,phrases): show notification when modify origin url in protected app details (#5334)
This commit is contained in:
parent
29eb633c44
commit
7266aee445
16 changed files with 50 additions and 0 deletions
|
@ -3,6 +3,7 @@ import {
|
|||
type Application,
|
||||
type CustomDomain as CustomDomainType,
|
||||
} from '@logto/schemas';
|
||||
import { cond } from '@silverhand/essentials';
|
||||
import { type ChangeEvent } from 'react';
|
||||
import { Controller, useFieldArray, useFormContext } from 'react-hook-form';
|
||||
import { Trans, useTranslation } from 'react-i18next';
|
||||
|
@ -45,6 +46,7 @@ function ProtectedAppSettings({ data }: Props) {
|
|||
const {
|
||||
control,
|
||||
register,
|
||||
getFieldState,
|
||||
formState: { errors },
|
||||
} = useFormContext<ApplicationForm>();
|
||||
|
||||
|
@ -146,6 +148,10 @@ function ProtectedAppSettings({ data }: Props) {
|
|||
<FormField
|
||||
isRequired
|
||||
title="protected_app.form.url_field_label"
|
||||
description={cond(
|
||||
getFieldState('protectedAppMetadata.origin').isDirty &&
|
||||
'protected_app.form.url_field_modification_notice'
|
||||
)}
|
||||
tip={<span className={styles.tip}>{t('application_details.origin_url_tip')}</span>}
|
||||
>
|
||||
<TextInput
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -18,6 +18,8 @@ const protected_app = {
|
|||
url_field_label: 'Origin URL',
|
||||
url_field_placeholder: 'https://',
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
create_application: 'Create application',
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
|
@ -33,6 +33,9 @@ const protected_app = {
|
|||
/** UNTRANSLATED */
|
||||
url_field_description: 'Enter the primary website address of your application.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_modification_notice:
|
||||
'Modifications to the Origin URL may take up to 1-2 minutes to propagate and become effective across global network locations.',
|
||||
/** UNTRANSLATED */
|
||||
url_field_tooltip:
|
||||
"Enter primary website address of your application, excluding any '/pathname'. After creation, you can customize route authentication rules.\n\nNote: The Origin URL itself won't require authentication; only accesses via the added app domain will be protected.",
|
||||
/** UNTRANSLATED */
|
||||
|
|
Loading…
Reference in a new issue