mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Add page title to settings
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
f4aad12f5a
commit
8575995080
@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
const SettingsPageTitle = ({ name }) => {
|
||||
const { formatMessage } = useIntl();
|
||||
const text = formatMessage({ id: 'Settings.PageTitle' }, { name });
|
||||
|
||||
return <Helmet title={text} />;
|
||||
};
|
||||
|
||||
SettingsPageTitle.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default SettingsPageTitle;
|
@ -81,6 +81,7 @@ export { default as UserProvider } from './components/UserProvider';
|
||||
export { default as ViewContainer } from './components/ViewContainer';
|
||||
export { default as CheckPagePermissions } from './components/CheckPagePermissions';
|
||||
export { default as CheckPermissions } from './components/CheckPermissions';
|
||||
export { default as SettingsPageTitle } from './components/SettingsPageTitle';
|
||||
|
||||
// Contexts
|
||||
export { GlobalContext, GlobalContextProvider, useGlobalContext } from './contexts/GlobalContext';
|
||||
|
@ -63,6 +63,7 @@
|
||||
"moment": "^2.16.0",
|
||||
"react": "^16.9.0",
|
||||
"react-dom": "^16.9.0",
|
||||
"react-helmet": "^6.0.0",
|
||||
"react-intl": "4.5.0",
|
||||
"react-router": "^5.0.0",
|
||||
"react-router-dom": "^5.0.0",
|
||||
|
@ -1,7 +1,18 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { SettingsPageTitle } from 'strapi-helper-plugin';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
|
||||
const AdvancedSettingsPage = () => {
|
||||
return <div>Advanced settings</div>;
|
||||
const { formatMessage } = useIntl();
|
||||
const pageTitle = formatMessage({ id: getTrad('HeaderNav.link.advancedSettings') });
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsPageTitle name={pageTitle} />
|
||||
<div>Advanced settings</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default AdvancedSettingsPage;
|
||||
|
@ -1,7 +1,18 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { SettingsPageTitle } from 'strapi-helper-plugin';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
|
||||
const EmailTemplatesPage = () => {
|
||||
return <div>Email templates</div>;
|
||||
const { formatMessage } = useIntl();
|
||||
const pageTitle = formatMessage({ id: getTrad('HeaderNav.link.emailTemplates') });
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsPageTitle name={pageTitle} />
|
||||
<div>Email</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default EmailTemplatesPage;
|
||||
|
@ -1,7 +1,18 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { SettingsPageTitle } from 'strapi-helper-plugin';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
|
||||
const ProvidersPage = () => {
|
||||
return <div>Providers</div>;
|
||||
const { formatMessage } = useIntl();
|
||||
const pageTitle = formatMessage({ id: getTrad('HeaderNav.link.providers') });
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsPageTitle name={pageTitle} />
|
||||
<div>Providers</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ProvidersPage;
|
||||
|
@ -72,7 +72,7 @@ export default strapi => {
|
||||
},
|
||||
{
|
||||
title: {
|
||||
id: getTrad('HeaderNav.link.email-templates'),
|
||||
id: getTrad('HeaderNav.link.emailTemplates'),
|
||||
defaultMessage: 'Email templates',
|
||||
},
|
||||
name: 'email-templates',
|
||||
@ -86,7 +86,7 @@ export default strapi => {
|
||||
},
|
||||
{
|
||||
title: {
|
||||
id: getTrad('HeaderNav.link.advanced-settings'),
|
||||
id: getTrad('HeaderNav.link.advancedSettings'),
|
||||
defaultMessage: 'Advanced Settings',
|
||||
},
|
||||
name: 'advanced-settings',
|
||||
|
@ -36,10 +36,7 @@
|
||||
"Email.template.email_confirmation": "Email address confirmation",
|
||||
"Email.template.reset_password": "Reset password",
|
||||
"Email.template.success_register": "Registration successful",
|
||||
"HeaderNav.link.advancedSettings": "Advanced settings",
|
||||
"HeaderNav.link.emailTemplates": "Email templates",
|
||||
"HeaderNav.link.providers": "Providers",
|
||||
"HeaderNav.link.roles": "Roles",
|
||||
|
||||
"HomePage.header.description": "Define the roles and permissions for your users.",
|
||||
"HomePage.header.title": "Roles & Permissions",
|
||||
"InputSearch.placeholder": "Search for a user",
|
||||
@ -110,6 +107,12 @@
|
||||
"notification.info.emailSent": "The email has been sent",
|
||||
"notification.success.delete": "The item has been deleted",
|
||||
"notification.success.submit": "Settings have been updated",
|
||||
|
||||
"TRANSLATIONS-TO-KEEP": "TRANSLATIONS TO KEEP",
|
||||
"HeaderNav.link.advancedSettings": "Advanced settings",
|
||||
"HeaderNav.link.emailTemplates": "Email templates",
|
||||
"HeaderNav.link.providers": "Providers",
|
||||
"HeaderNav.link.roles": "Roles",
|
||||
"plugin.description.long": "Protect your API with a full authentication process based on JWT. This plugin comes also with an ACL strategy that allows you to manage the permissions between the groups of users.",
|
||||
"plugin.description.short": "Protect your API with a full authentication process based on JWT",
|
||||
"plugin.name": "Users & Permissions Plugin"
|
||||
|
Loading…
x
Reference in New Issue
Block a user