mirror of
https://github.com/strapi/strapi.git
synced 2025-12-30 00:37:24 +00:00
notifyStatus implemented
This commit is contained in:
parent
c343bab43a
commit
3f22cb306d
@ -17,6 +17,7 @@ import { Grid, GridItem } from '@strapi/parts/Grid';
|
||||
import { H3 } from '@strapi/parts/Text';
|
||||
import { TextInput } from '@strapi/parts/TextInput';
|
||||
import { Button } from '@strapi/parts/Button';
|
||||
import { useNotifyAT } from '@strapi/parts/LiveRegions';
|
||||
import CheckIcon from '@strapi/icons/CheckIcon';
|
||||
import Configuration from './components/Configuration';
|
||||
import schema from '../../utils/schema';
|
||||
@ -35,6 +36,7 @@ const SettingsPage = () => {
|
||||
const toggleNotification = useNotification();
|
||||
const { formatMessage } = useIntl();
|
||||
const { lockApp, unlockApp } = useOverlayBlocker();
|
||||
const { notifyStatus } = useNotifyAT();
|
||||
useFocusWhenNavigate();
|
||||
|
||||
const [formErrors, setFormErrors] = useState({});
|
||||
@ -98,6 +100,13 @@ const SettingsPage = () => {
|
||||
|
||||
fetchEmailSettings()
|
||||
.then(config => {
|
||||
notifyStatus(
|
||||
formatMessage({
|
||||
id: 'Settings.email.plugin.notification.data.loaded',
|
||||
defaultMessage: 'Email settings data has been loaded',
|
||||
})
|
||||
);
|
||||
|
||||
setConfig(config);
|
||||
|
||||
const testAddressFound = get(config, 'settings.testAddress');
|
||||
@ -116,7 +125,7 @@ const SettingsPage = () => {
|
||||
})
|
||||
)
|
||||
.finally(() => setIsLoading(false));
|
||||
}, [formatMessage, toggleNotification]);
|
||||
}, [formatMessage, toggleNotification, notifyStatus]);
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
|
||||
@ -14,5 +14,6 @@
|
||||
"Settings.email.plugin.notification.test.error": "Failed to send a test mail to {to}",
|
||||
"Settings.email.plugin.notification.test.success": "Email test succeeded, check the {to} mailbox",
|
||||
"Settings.email.plugin.subTitle": "Test the settings for the email plugin",
|
||||
"Settings.email.plugin.title": "Email settings"
|
||||
"Settings.email.plugin.title": "Email settings",
|
||||
"Settings.email.plugin.notification.data.loaded": "Email settings data has been loaded"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user