@strapi/admin 4.14.5 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/StrapiApp.js +13 -12
- package/admin/src/components/AuthenticatedApp.tsx +187 -0
- package/admin/src/components/ConfigurationProvider.tsx +2 -1
- package/admin/src/components/GuidedTour/Homepage.tsx +111 -0
- package/admin/src/components/GuidedTour/Modal.tsx +303 -0
- package/admin/src/components/GuidedTour/Ornaments.tsx +74 -0
- package/admin/src/components/GuidedTour/Provider.tsx +253 -0
- package/admin/src/components/GuidedTour/{layout.js → constants.ts} +13 -3
- package/admin/src/components/LanguageProvider.tsx +1 -0
- package/admin/src/components/Providers.tsx +125 -0
- package/admin/src/components/RBACProvider.tsx +124 -0
- package/admin/src/components/Theme.tsx +4 -2
- package/admin/src/components/ThemeToggleProvider.tsx +23 -9
- package/admin/src/components/__mocks__/{LanguageProvider.js → LanguageProvider.ts} +2 -0
- package/admin/src/{constants.js → constants.ts} +48 -0
- package/admin/src/content-manager/components/BlocksEditor/Toolbar/index.js +75 -51
- package/admin/src/content-manager/components/BlocksEditor/hooks/useBlocksStore.js +72 -14
- package/admin/src/content-manager/pages/App/selectors.js +1 -1
- package/admin/src/content-manager/pages/App/useContentManagerInitData.js +3 -1
- package/admin/src/content-manager/pages/EditView/selectors.js +1 -1
- package/admin/src/content-manager/pages/EditViewLayoutManager/index.js +3 -1
- package/admin/src/content-manager/pages/ListView/components/Body/index.js +53 -56
- package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/SelectedEntriesModal/index.js +5 -3
- package/admin/src/content-manager/pages/ListView/components/TableRows/index.js +1 -1
- package/admin/src/content-manager/pages/ListView/index.js +33 -50
- package/admin/src/content-manager/pages/ListView/selectors.js +1 -1
- package/admin/src/contexts/admin.ts +1 -0
- package/admin/src/contexts/apiTokenPermissions.tsx +64 -0
- package/admin/src/contexts/themeToggle.ts +3 -1
- package/admin/src/core/store/configure.ts +91 -0
- package/admin/src/core/store/hooks.ts +15 -0
- package/admin/src/hooks/index.js +0 -1
- package/admin/src/hooks/{useContentTypes/useContentTypes.js → useContentTypes.ts} +39 -16
- package/admin/src/hooks/useSettingsForm/index.js +14 -2
- package/admin/src/hooks/useSettingsMenu/constants.js +39 -0
- package/admin/src/index.js +2 -4
- package/admin/src/layouts/{AppLayout/index.js → AppLayout.tsx} +7 -10
- package/admin/src/layouts/UnauthenticatedLayout.tsx +77 -0
- package/admin/src/pages/Admin/index.js +11 -5
- package/admin/src/pages/App/index.js +7 -4
- package/admin/src/pages/App/selectors.js +1 -1
- package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +2 -1
- package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +2 -1
- package/admin/src/pages/AuthPage/components/Login/index.js +1 -1
- package/admin/src/pages/AuthPage/components/Oops/index.js +2 -1
- package/admin/src/pages/AuthPage/components/Register/index.js +1 -1
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +2 -1
- package/admin/src/pages/AuthPage/index.js +2 -3
- package/admin/src/pages/HomePage/index.js +6 -3
- package/admin/src/pages/{InternalErrorPage/index.js → InternalErrorPage.tsx} +10 -6
- package/admin/src/pages/{NotFoundPage/index.js → NotFoundPage.tsx} +9 -7
- package/admin/src/pages/ProfilePage/components/Preferences/index.js +23 -9
- package/admin/src/pages/ProfilePage/index.js +1 -1
- package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +20 -0
- package/admin/src/pages/SettingsPage/constants.js +33 -0
- package/admin/src/pages/SettingsPage/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ActionBoundRoutes/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/CollapsableContentType/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Permissions/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/AuditLogs/SalesPage.js +50 -0
- package/admin/src/pages/SettingsPage/pages/ReviewWorkflows/SalesPage.js +53 -0
- package/admin/src/pages/SettingsPage/pages/SingleSignOn/SalesPage.js +53 -0
- package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +2 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/DynamicTable/TableRows/index.js +1 -1
- package/admin/src/pages/{UseCasePage/index.js → UseCasePage.tsx} +10 -12
- package/admin/src/translations/en.json +5 -0
- package/admin/src/utils/createRoute.tsx +54 -0
- package/admin/src/utils/formatAPIErrors.ts +18 -0
- package/admin/src/utils/getFullName.ts +3 -0
- package/admin/src/utils/{uniqueAdminHash.js → hashAdminUserEmail.ts} +6 -3
- package/admin/src/utils/makeUniqueRoutes.ts +11 -0
- package/build/{1049.9236e785.chunk.js → 1049.ecc10c97.chunk.js} +1 -1
- package/build/1217.96155682.chunk.js +35 -0
- package/build/{1227.e0f7447b.chunk.js → 1227.947ceaf9.chunk.js} +1 -1
- package/build/1306.2699df52.chunk.js +79 -0
- package/build/{1386.07f2bbb3.chunk.js → 1386.eabd8a1e.chunk.js} +1 -1
- package/build/{2379.b0bc4013.chunk.js → 2379.7ce8e110.chunk.js} +1 -1
- package/build/{2395.d37b1025.chunk.js → 2395.acb961a8.chunk.js} +3 -3
- package/build/{2801.12522720.chunk.js → 2801.4711ea5a.chunk.js} +1 -1
- package/build/{3019.0d74d080.chunk.js → 3019.fde2e1be.chunk.js} +2 -2
- package/build/3460.8644e608.chunk.js +146 -0
- package/build/{3483.8f1b25f8.chunk.js → 3483.db8c1520.chunk.js} +1 -1
- package/build/{4174.2c4f958e.chunk.js → 4174.49cedb6a.chunk.js} +1 -1
- package/build/4732.149f5f8f.chunk.js +1 -0
- package/build/{502.b845473a.chunk.js → 502.f536f78b.chunk.js} +1 -1
- package/build/{7464.91341b4f.chunk.js → 7464.579564ac.chunk.js} +1 -1
- package/build/7811.fdbe09af.chunk.js +103 -0
- package/build/{7897.dffa5ad5.chunk.js → 7897.63ba0a00.chunk.js} +1 -1
- package/build/{8276.e9698944.chunk.js → 8276.9abe4679.chunk.js} +3 -3
- package/build/8773.ee67141c.chunk.js +48 -0
- package/build/9077.2cc01ac8.chunk.js +105 -0
- package/build/{9218.306ad178.chunk.js → 9218.b2d367f8.chunk.js} +1 -1
- package/build/Admin-authenticatedApp.059dc48f.chunk.js +79 -0
- package/build/Admin_InternalErrorPage.06eeef20.chunk.js +1 -0
- package/build/Admin_homePage.56b9eb3f.chunk.js +81 -0
- package/build/{Admin_marketplace.0db78604.chunk.js → Admin_marketplace.d693a435.chunk.js} +1 -1
- package/build/{Admin_pluginsPage.1083f7f0.chunk.js → Admin_pluginsPage.ae2c872a.chunk.js} +1 -1
- package/build/Admin_profilePage.89099d5b.chunk.js +13 -0
- package/build/Admin_settingsPage.88c45586.chunk.js +12 -0
- package/build/{Upload_ConfigureTheView.3cfeb108.chunk.js → Upload_ConfigureTheView.44f28145.chunk.js} +1 -1
- package/build/admin-app.990e112f.chunk.js +69 -0
- package/build/{admin-edit-roles-page.556fac52.chunk.js → admin-edit-roles-page.4e1eb4a9.chunk.js} +3 -3
- package/build/admin-edit-users.5b91404e.chunk.js +10 -0
- package/build/{admin-roles-list.15918328.chunk.js → admin-roles-list.89dd94fe.chunk.js} +1 -1
- package/build/{admin-users.74fddc87.chunk.js → admin-users.7be4fc5f.chunk.js} +2 -2
- package/build/{api-tokens-create-page.c08ae118.chunk.js → api-tokens-create-page.571920e5.chunk.js} +1 -1
- package/build/{api-tokens-edit-page.ce18efdc.chunk.js → api-tokens-edit-page.cbdc81b1.chunk.js} +1 -1
- package/build/{api-tokens-list-page.783b7569.chunk.js → api-tokens-list-page.de0c49e8.chunk.js} +2 -2
- package/build/audit-logs-sales-page.2955db88.chunk.js +1 -0
- package/build/{audit-logs-settings-page.12aeea8c.chunk.js → audit-logs-settings-page.b0cb5164.chunk.js} +1 -1
- package/build/content-manager.de7ae330.chunk.js +1241 -0
- package/build/{content-type-builder-list-view.38ed3935.chunk.js → content-type-builder-list-view.6c8d3213.chunk.js} +1 -1
- package/build/{content-type-builder-translation-en-json.43f9d7bc.chunk.js → content-type-builder-translation-en-json.74d80f18.chunk.js} +1 -1
- package/build/{content-type-builder.758a9d23.chunk.js → content-type-builder.0bc97051.chunk.js} +13 -23
- package/build/{email-settings-page.e08a587e.chunk.js → email-settings-page.07712efc.chunk.js} +1 -1
- package/build/en-json.5b907f67.chunk.js +1 -0
- package/build/{i18n-settings-page.3186e3e9.chunk.js → i18n-settings-page.5c34f012.chunk.js} +1 -1
- package/build/index.html +1 -1
- package/build/main.f84563f1.js +2665 -0
- package/build/review-workflows-sales-page.f46a8f00.chunk.js +1 -0
- package/build/{review-workflows-settings-create-view.5cdc4d64.chunk.js → review-workflows-settings-create-view.d0544fb0.chunk.js} +1 -1
- package/build/{review-workflows-settings-edit-view.53bf7865.chunk.js → review-workflows-settings-edit-view.aabf49ef.chunk.js} +1 -1
- package/build/review-workflows-settings-list-view.8b0525ab.chunk.js +56 -0
- package/build/runtime~main.270fd45f.js +2 -0
- package/build/sso-sales-page.ef22e469.chunk.js +1 -0
- package/build/sso-settings-page.21e16ae4.chunk.js +1 -0
- package/build/{transfer-tokens-create-page.2662d519.chunk.js → transfer-tokens-create-page.3366204d.chunk.js} +1 -1
- package/build/{transfer-tokens-edit-page.f64d8d8c.chunk.js → transfer-tokens-edit-page.15cf0f73.chunk.js} +1 -1
- package/build/{transfer-tokens-list-page.e6fd5f87.chunk.js → transfer-tokens-list-page.0bc0e682.chunk.js} +2 -2
- package/build/{upload-settings.450a1de0.chunk.js → upload-settings.1319dca0.chunk.js} +1 -1
- package/build/{upload.0d53e7a3.chunk.js → upload.1ced11be.chunk.js} +1 -1
- package/build/{users-advanced-settings-page.4a1f1f6d.chunk.js → users-advanced-settings-page.8e657084.chunk.js} +1 -1
- package/build/{users-email-settings-page.ea81fe82.chunk.js → users-email-settings-page.e57745e5.chunk.js} +1 -1
- package/build/{users-providers-settings-page.10280cdb.chunk.js → users-providers-settings-page.55796d13.chunk.js} +1 -1
- package/build/{users-roles-settings-page.4a7158be.chunk.js → users-roles-settings-page.57079245.chunk.js} +1 -1
- package/build/webhook-edit-page.3a28b2e7.chunk.js +33 -0
- package/build/{webhook-list-page.f57285ca.chunk.js → webhook-list-page.ee80767b.chunk.js} +1 -1
- package/ee/admin/pages/AuthPage/components/Login/index.js +1 -1
- package/ee/admin/pages/AuthPage/components/Providers/index.js +2 -1
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/selectors.js +1 -1
- package/ee/server/bootstrap.js +1 -1
- package/ee/server/controllers/admin.js +1 -1
- package/ee/server/controllers/user.js +1 -1
- package/ee/server/destroy.js +1 -1
- package/ee/server/register.js +1 -1
- package/ee/server/routes/utils.js +1 -1
- package/ee/server/services/audit-logs.js +1 -1
- package/ee/server/services/passport/sso.js +1 -1
- package/ee/server/services/passport.js +1 -1
- package/ee/server/services/seat-enforcement.js +1 -1
- package/ee/server/utils/sso-lock.js +1 -1
- package/ee/server/validation/role.js +1 -1
- package/ee/server/validation/user.js +1 -1
- package/package.json +15 -16
- package/server/controllers/admin.js +1 -1
- package/shared/entities.ts +1 -1
- package/shared/permissions.ts +35 -35
- package/shared/schema.ts +9 -0
- package/admin/src/components/AuthenticatedApp/index.js +0 -116
- package/admin/src/components/AuthenticatedApp/utils/api.js +0 -47
- package/admin/src/components/AuthenticatedApp/utils/checkLatestStrapiVersion.ts +0 -13
- package/admin/src/components/AuthenticatedApp/utils/fetchStrapiLatestRelease.ts +0 -19
- package/admin/src/components/GuidedTour/Homepage/components/Step.js +0 -61
- package/admin/src/components/GuidedTour/Homepage/components/Stepper.js +0 -61
- package/admin/src/components/GuidedTour/Homepage/index.js +0 -71
- package/admin/src/components/GuidedTour/Modal/components/Content.js +0 -66
- package/admin/src/components/GuidedTour/Modal/components/Modal.js +0 -72
- package/admin/src/components/GuidedTour/Modal/components/StepNumberWithPadding.js +0 -26
- package/admin/src/components/GuidedTour/Modal/components/Stepper.js +0 -118
- package/admin/src/components/GuidedTour/Modal/index.js +0 -94
- package/admin/src/components/GuidedTour/Modal/reducer.js +0 -29
- package/admin/src/components/GuidedTour/Stepper/StepLine.js +0 -29
- package/admin/src/components/GuidedTour/Stepper/StepNumber.js +0 -71
- package/admin/src/components/GuidedTour/constants.js +0 -3
- package/admin/src/components/GuidedTour/index.js +0 -102
- package/admin/src/components/GuidedTour/init.js +0 -37
- package/admin/src/components/GuidedTour/reducer.js +0 -50
- package/admin/src/components/GuidedTour/utils/arePreviousSectionsDone.js +0 -13
- package/admin/src/components/GuidedTour/utils/arePreviousStepsDone.js +0 -12
- package/admin/src/components/GuidedTour/utils/isGuidedTourCompleted.js +0 -6
- package/admin/src/components/GuidedTour/utils/persistStateToLocaleStorage.js +0 -34
- package/admin/src/components/Providers/index.js +0 -156
- package/admin/src/components/RBACProvider/actions.js +0 -10
- package/admin/src/components/RBACProvider/constants.js +0 -2
- package/admin/src/components/RBACProvider/index.js +0 -39
- package/admin/src/components/RBACProvider/reducer.js +0 -51
- package/admin/src/contexts/ApiTokenPermissions/index.js +0 -25
- package/admin/src/core/store/configureStore.js +0 -47
- package/admin/src/exposedHooks.js +0 -27
- package/admin/src/hooks/useContentTypes/index.js +0 -1
- package/admin/src/injectionZones.js +0 -25
- package/admin/src/layouts/UnauthenticatedLayout/LocaleToggle/index.js +0 -29
- package/admin/src/layouts/UnauthenticatedLayout/index.js +0 -55
- package/admin/src/reducers.js +0 -23
- package/admin/src/utils/checkFormValidity.js +0 -15
- package/admin/src/utils/createRoute.js +0 -50
- package/admin/src/utils/formatAPIErrors.js +0 -17
- package/admin/src/utils/getAttributesToDisplay.js +0 -19
- package/admin/src/utils/getExistingActions.js +0 -32
- package/admin/src/utils/getFullName.js +0 -9
- package/admin/src/utils/index.js +0 -9
- package/admin/src/utils/makeUniqueRoutes.js +0 -6
- package/admin/src/utils/sortLinks.js +0 -5
- package/build/1222.fe92c653.chunk.js +0 -35
- package/build/2225.a2147b8f.chunk.js +0 -79
- package/build/3021.33ad47fb.chunk.js +0 -103
- package/build/6373.1a21d665.chunk.js +0 -105
- package/build/8894.5ca4852a.chunk.js +0 -26
- package/build/9302.550cf5b7.chunk.js +0 -146
- package/build/Admin-authenticatedApp.e897fccb.chunk.js +0 -79
- package/build/Admin_InternalErrorPage.e2431a95.chunk.js +0 -1
- package/build/Admin_homePage.71ef8d06.chunk.js +0 -81
- package/build/Admin_profilePage.61704b7d.chunk.js +0 -13
- package/build/Admin_settingsPage.39cb9fca.chunk.js +0 -111
- package/build/admin-app.06f5e70a.chunk.js +0 -69
- package/build/admin-edit-users.64fd1318.chunk.js +0 -10
- package/build/content-manager.2e3f660b.chunk.js +0 -1220
- package/build/en-json.bd611a8e.chunk.js +0 -1
- package/build/main.00ea6f5a.js +0 -2665
- package/build/review-workflows-settings-list-view.b4a8aefb.chunk.js +0 -56
- package/build/runtime~main.e3bf3980.js +0 -2
- package/build/sso-settings-page.6a35d473.chunk.js +0 -1
- package/build/webhook-edit-page.65ac30ee.chunk.js +0 -33
- /package/admin/src/hooks/{useContentTypes/__mocks__/index.js → __mocks__/useContentTypes.ts} +0 -0
|
@@ -12,12 +12,12 @@ import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
|
12
12
|
import { useDispatch, useSelector } from 'react-redux';
|
|
13
13
|
import { Route, Switch } from 'react-router-dom';
|
|
14
14
|
|
|
15
|
-
import GuidedTourModal from '../../components/GuidedTour/Modal';
|
|
15
|
+
import { GuidedTourModal } from '../../components/GuidedTour/Modal';
|
|
16
16
|
import { LeftMenu } from '../../components/LeftMenu';
|
|
17
17
|
import { useConfiguration } from '../../hooks/useConfiguration';
|
|
18
18
|
import { useMenu } from '../../hooks/useMenu';
|
|
19
|
-
import AppLayout from '../../layouts/AppLayout';
|
|
20
|
-
import { createRoute } from '../../utils';
|
|
19
|
+
import { AppLayout } from '../../layouts/AppLayout';
|
|
20
|
+
import { createRoute } from '../../utils/createRoute';
|
|
21
21
|
import { SET_APP_RUNTIME_STATUS } from '../App/constants';
|
|
22
22
|
|
|
23
23
|
import Onboarding from './Onboarding';
|
|
@@ -33,10 +33,16 @@ const MarketplacePage = lazy(() =>
|
|
|
33
33
|
import(/* webpackChunkName: "Admin_marketplace" */ '../MarketplacePage')
|
|
34
34
|
);
|
|
35
35
|
const NotFoundPage = lazy(() =>
|
|
36
|
-
import(/* webpackChunkName: "Admin_NotFoundPage" */ '../NotFoundPage')
|
|
36
|
+
import(/* webpackChunkName: "Admin_NotFoundPage" */ '../NotFoundPage').then(
|
|
37
|
+
({ NotFoundPage }) => ({ default: NotFoundPage })
|
|
38
|
+
)
|
|
37
39
|
);
|
|
38
40
|
const InternalErrorPage = lazy(() =>
|
|
39
|
-
import(/* webpackChunkName: "Admin_InternalErrorPage" */ '../InternalErrorPage')
|
|
41
|
+
import(/* webpackChunkName: "Admin_InternalErrorPage" */ '../InternalErrorPage').then(
|
|
42
|
+
({ InternalErrorPage }) => ({
|
|
43
|
+
default: InternalErrorPage,
|
|
44
|
+
})
|
|
45
|
+
)
|
|
40
46
|
);
|
|
41
47
|
|
|
42
48
|
const ProfilePage = lazy(() =>
|
|
@@ -25,15 +25,18 @@ import { PrivateRoute } from '../../components/PrivateRoute';
|
|
|
25
25
|
import { ADMIN_PERMISSIONS_CE } from '../../constants';
|
|
26
26
|
import { useConfiguration } from '../../hooks/useConfiguration';
|
|
27
27
|
import { useEnterprise } from '../../hooks/useEnterprise';
|
|
28
|
-
import { createRoute
|
|
28
|
+
import { createRoute } from '../../utils/createRoute';
|
|
29
|
+
import { makeUniqueRoutes } from '../../utils/makeUniqueRoutes';
|
|
29
30
|
import AuthPage from '../AuthPage';
|
|
30
|
-
import NotFoundPage from '../NotFoundPage';
|
|
31
|
-
import UseCasePage from '../UseCasePage';
|
|
31
|
+
import { NotFoundPage } from '../NotFoundPage';
|
|
32
|
+
import { UseCasePage } from '../UseCasePage';
|
|
32
33
|
|
|
33
34
|
import { ROUTES_CE, SET_ADMIN_PERMISSIONS } from './constants';
|
|
34
35
|
|
|
35
36
|
const AuthenticatedApp = lazy(() =>
|
|
36
|
-
import(/* webpackChunkName: "Admin-authenticatedApp" */ '../../components/AuthenticatedApp')
|
|
37
|
+
import(/* webpackChunkName: "Admin-authenticatedApp" */ '../../components/AuthenticatedApp').then(
|
|
38
|
+
(mod) => ({ default: mod.AuthenticatedApp })
|
|
39
|
+
)
|
|
37
40
|
);
|
|
38
41
|
|
|
39
42
|
function App() {
|
|
@@ -7,9 +7,10 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { useIntl } from 'react-intl';
|
|
8
8
|
|
|
9
9
|
import { Logo } from '../../../../components/UnauthenticatedLogo';
|
|
10
|
-
import
|
|
10
|
+
import {
|
|
11
11
|
Column,
|
|
12
12
|
LayoutContent,
|
|
13
|
+
UnauthenticatedLayout,
|
|
13
14
|
} from '../../../../layouts/UnauthenticatedLayout';
|
|
14
15
|
|
|
15
16
|
const ForgotPassword = ({ onSubmit, schema }) => {
|
|
@@ -5,9 +5,10 @@ import { Link } from '@strapi/helper-plugin';
|
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
|
|
7
7
|
import { Logo } from '../../../../components/UnauthenticatedLogo';
|
|
8
|
-
import
|
|
8
|
+
import {
|
|
9
9
|
Column,
|
|
10
10
|
LayoutContent,
|
|
11
|
+
UnauthenticatedLayout,
|
|
11
12
|
} from '../../../../layouts/UnauthenticatedLayout';
|
|
12
13
|
|
|
13
14
|
const ForgotPasswordSuccess = () => {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
|
|
5
|
-
import UnauthenticatedLayout from '../../../../layouts/UnauthenticatedLayout';
|
|
5
|
+
import { UnauthenticatedLayout } from '../../../../layouts/UnauthenticatedLayout';
|
|
6
6
|
|
|
7
7
|
import BaseLogin from './BaseLogin';
|
|
8
8
|
|
|
@@ -5,9 +5,10 @@ import { Link, useQuery } from '@strapi/helper-plugin';
|
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
|
|
7
7
|
import { Logo } from '../../../../components/UnauthenticatedLogo';
|
|
8
|
-
import
|
|
8
|
+
import {
|
|
9
9
|
Column,
|
|
10
10
|
LayoutContent,
|
|
11
|
+
UnauthenticatedLayout,
|
|
11
12
|
} from '../../../../layouts/UnauthenticatedLayout';
|
|
12
13
|
|
|
13
14
|
const Oops = () => {
|
|
@@ -32,7 +32,7 @@ import styled from 'styled-components';
|
|
|
32
32
|
|
|
33
33
|
import { useNpsSurveySettings } from '../../../../components/NpsSurvey';
|
|
34
34
|
import { Logo } from '../../../../components/UnauthenticatedLogo';
|
|
35
|
-
import
|
|
35
|
+
import { LayoutContent, UnauthenticatedLayout } from '../../../../layouts/UnauthenticatedLayout';
|
|
36
36
|
import FieldActionWrapper from '../FieldActionWrapper';
|
|
37
37
|
|
|
38
38
|
const A = styled.a`
|
|
@@ -9,9 +9,10 @@ import { useIntl } from 'react-intl';
|
|
|
9
9
|
import styled from 'styled-components';
|
|
10
10
|
|
|
11
11
|
import { Logo } from '../../../../components/UnauthenticatedLogo';
|
|
12
|
-
import
|
|
12
|
+
import {
|
|
13
13
|
Column,
|
|
14
14
|
LayoutContent,
|
|
15
|
+
UnauthenticatedLayout,
|
|
15
16
|
} from '../../../../layouts/UnauthenticatedLayout';
|
|
16
17
|
import FieldActionWrapper from '../FieldActionWrapper';
|
|
17
18
|
|
|
@@ -8,10 +8,9 @@ import omit from 'lodash/omit';
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import { Redirect, useHistory, useRouteMatch } from 'react-router-dom';
|
|
10
10
|
|
|
11
|
-
import persistStateToLocaleStorage from '../../components/GuidedTour/utils/persistStateToLocaleStorage';
|
|
12
11
|
import { useLocales } from '../../components/LanguageProvider';
|
|
13
12
|
import { useEnterprise } from '../../hooks/useEnterprise';
|
|
14
|
-
import formatAPIErrors from '../../utils/formatAPIErrors';
|
|
13
|
+
import { formatAPIErrors} from '../../utils/formatAPIErrors';
|
|
15
14
|
|
|
16
15
|
import { LoginCE } from './components/Login';
|
|
17
16
|
import { FORMS } from './constants';
|
|
@@ -181,7 +180,7 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
181
180
|
const isUserSuperAdmin = roles.find(({ code }) => code === 'strapi-super-admin');
|
|
182
181
|
|
|
183
182
|
if (isUserSuperAdmin) {
|
|
184
|
-
|
|
183
|
+
auth.set(false, 'GUIDED_TOUR_SKIPPED', true);
|
|
185
184
|
setSkipped(false);
|
|
186
185
|
trackUsage('didLaunchGuidedtour');
|
|
187
186
|
}
|
|
@@ -12,8 +12,7 @@ import { FormattedMessage } from 'react-intl';
|
|
|
12
12
|
import { useHistory } from 'react-router-dom';
|
|
13
13
|
import styled from 'styled-components';
|
|
14
14
|
|
|
15
|
-
import GuidedTourHomepage from '../../components/GuidedTour/Homepage';
|
|
16
|
-
import isGuidedTourCompleted from '../../components/GuidedTour/utils/isGuidedTourCompleted';
|
|
15
|
+
import { GuidedTourHomepage } from '../../components/GuidedTour/Homepage';
|
|
17
16
|
import { useContentTypes } from '../../hooks/useContentTypes';
|
|
18
17
|
import { useEnterprise } from '../../hooks/useEnterprise';
|
|
19
18
|
|
|
@@ -37,7 +36,11 @@ export const HomePageCE = () => {
|
|
|
37
36
|
const { collectionTypes, singleTypes, isLoading: isLoadingForModels } = useContentTypes();
|
|
38
37
|
const { guidedTourState, isGuidedTourVisible, isSkipped } = useGuidedTour();
|
|
39
38
|
const showGuidedTour =
|
|
40
|
-
!
|
|
39
|
+
!Object.values(guidedTourState).every((section) =>
|
|
40
|
+
Object.values(section).every((step) => step)
|
|
41
|
+
) &&
|
|
42
|
+
isGuidedTourVisible &&
|
|
43
|
+
!isSkipped;
|
|
41
44
|
const { push } = useHistory();
|
|
42
45
|
const handleClick = (e) => {
|
|
43
46
|
e.preventDefault();
|
|
@@ -4,15 +4,21 @@
|
|
|
4
4
|
* This is the page we show when the user gets a 500 error
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
8
7
|
|
|
9
|
-
import {
|
|
10
|
-
|
|
8
|
+
import {
|
|
9
|
+
ContentLayout,
|
|
10
|
+
EmptyStateLayout,
|
|
11
|
+
HeaderLayout,
|
|
12
|
+
LinkButton,
|
|
13
|
+
Main,
|
|
14
|
+
} from '@strapi/design-system';
|
|
15
|
+
import { useFocusWhenNavigate } from '@strapi/helper-plugin';
|
|
11
16
|
import { ArrowRight, EmptyPictures } from '@strapi/icons';
|
|
12
17
|
import { useIntl } from 'react-intl';
|
|
13
18
|
|
|
14
|
-
const InternalErrorPage = () => {
|
|
19
|
+
export const InternalErrorPage = () => {
|
|
15
20
|
const { formatMessage } = useIntl();
|
|
21
|
+
|
|
16
22
|
useFocusWhenNavigate();
|
|
17
23
|
|
|
18
24
|
return (
|
|
@@ -46,5 +52,3 @@ const InternalErrorPage = () => {
|
|
|
46
52
|
</Main>
|
|
47
53
|
);
|
|
48
54
|
};
|
|
49
|
-
|
|
50
|
-
export default InternalErrorPage;
|
|
@@ -4,14 +4,18 @@
|
|
|
4
4
|
* This is the page we show when the user visits a url that doesn't have a route
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import {
|
|
8
|
+
ContentLayout,
|
|
9
|
+
EmptyStateLayout,
|
|
10
|
+
HeaderLayout,
|
|
11
|
+
LinkButton,
|
|
12
|
+
Main,
|
|
13
|
+
} from '@strapi/design-system';
|
|
14
|
+
import { useFocusWhenNavigate } from '@strapi/helper-plugin';
|
|
11
15
|
import { ArrowRight, EmptyPictures } from '@strapi/icons';
|
|
12
16
|
import { useIntl } from 'react-intl';
|
|
13
17
|
|
|
14
|
-
const
|
|
18
|
+
export const NotFoundPage = () => {
|
|
15
19
|
const { formatMessage } = useIntl();
|
|
16
20
|
useFocusWhenNavigate();
|
|
17
21
|
|
|
@@ -46,5 +50,3 @@ const NoContentType = () => {
|
|
|
46
50
|
</Main>
|
|
47
51
|
);
|
|
48
52
|
};
|
|
49
|
-
|
|
50
|
-
export default NoContentType;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Box,
|
|
5
|
+
Flex,
|
|
6
|
+
Grid,
|
|
7
|
+
GridItem,
|
|
8
|
+
SingleSelect,
|
|
9
|
+
SingleSelectOption,
|
|
10
|
+
Typography,
|
|
11
|
+
} from '@strapi/design-system';
|
|
4
12
|
import upperFirst from 'lodash/upperFirst';
|
|
5
13
|
import PropTypes from 'prop-types';
|
|
6
14
|
import { useIntl } from 'react-intl';
|
|
@@ -57,7 +65,7 @@ const Preferences = ({ onChange, values, localeNames, allApplicationThemes }) =>
|
|
|
57
65
|
</Flex>
|
|
58
66
|
<Grid gap={5}>
|
|
59
67
|
<GridItem s={12} col={6}>
|
|
60
|
-
<
|
|
68
|
+
<SingleSelect
|
|
61
69
|
label={formatMessage({
|
|
62
70
|
id: 'Settings.profile.form.section.experience.interfaceLanguage',
|
|
63
71
|
defaultMessage: 'Interface language',
|
|
@@ -87,14 +95,14 @@ const Preferences = ({ onChange, values, localeNames, allApplicationThemes }) =>
|
|
|
87
95
|
}}
|
|
88
96
|
>
|
|
89
97
|
{Object.entries(localeNames).map(([language, langName]) => (
|
|
90
|
-
<
|
|
98
|
+
<SingleSelectOption value={language} key={language}>
|
|
91
99
|
{langName}
|
|
92
|
-
</
|
|
100
|
+
</SingleSelectOption>
|
|
93
101
|
))}
|
|
94
|
-
</
|
|
102
|
+
</SingleSelect>
|
|
95
103
|
</GridItem>
|
|
96
104
|
<GridItem s={12} col={6}>
|
|
97
|
-
<
|
|
105
|
+
<SingleSelect
|
|
98
106
|
label={formatMessage({
|
|
99
107
|
id: 'Settings.profile.form.section.experience.mode.label',
|
|
100
108
|
defaultMessage: 'Interface mode',
|
|
@@ -114,8 +122,14 @@ const Preferences = ({ onChange, values, localeNames, allApplicationThemes }) =>
|
|
|
114
122
|
});
|
|
115
123
|
}}
|
|
116
124
|
>
|
|
125
|
+
<SingleSelectOption value="system">
|
|
126
|
+
{formatMessage({
|
|
127
|
+
id: 'Settings.profile.form.section.experience.mode.option-system-label',
|
|
128
|
+
defaultMessage: 'Use system settings',
|
|
129
|
+
})}
|
|
130
|
+
</SingleSelectOption>
|
|
117
131
|
{themesToDisplay.map((theme) => (
|
|
118
|
-
<
|
|
132
|
+
<SingleSelectOption value={theme} key={theme}>
|
|
119
133
|
{formatMessage(
|
|
120
134
|
{
|
|
121
135
|
id: 'Settings.profile.form.section.experience.mode.option-label',
|
|
@@ -128,9 +142,9 @@ const Preferences = ({ onChange, values, localeNames, allApplicationThemes }) =>
|
|
|
128
142
|
}),
|
|
129
143
|
}
|
|
130
144
|
)}
|
|
131
|
-
</
|
|
145
|
+
</SingleSelectOption>
|
|
132
146
|
))}
|
|
133
|
-
</
|
|
147
|
+
</SingleSelect>
|
|
134
148
|
</GridItem>
|
|
135
149
|
</Grid>
|
|
136
150
|
</Flex>
|
|
@@ -28,7 +28,7 @@ import { useMutation, useQuery, useQueryClient } from 'react-query';
|
|
|
28
28
|
|
|
29
29
|
import { useLocales } from '../../components/LanguageProvider';
|
|
30
30
|
import { useThemeToggle } from '../../hooks/useThemeToggle';
|
|
31
|
-
import { getFullName } from '../../utils';
|
|
31
|
+
import { getFullName } from '../../utils/getFullName';
|
|
32
32
|
|
|
33
33
|
import Password from './components/Password';
|
|
34
34
|
import Preferences from './components/Preferences';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import { Icon } from '@strapi/design-system';
|
|
3
4
|
import {
|
|
4
5
|
SubNav,
|
|
5
6
|
SubNavHeader,
|
|
@@ -8,9 +9,21 @@ import {
|
|
|
8
9
|
SubNavSections,
|
|
9
10
|
} from '@strapi/design-system/v2';
|
|
10
11
|
import { useTracking } from '@strapi/helper-plugin';
|
|
12
|
+
import { Lock } from '@strapi/icons';
|
|
11
13
|
import PropTypes from 'prop-types';
|
|
12
14
|
import { useIntl } from 'react-intl';
|
|
13
15
|
import { NavLink, useLocation } from 'react-router-dom';
|
|
16
|
+
import styled from 'styled-components';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* TODO: refactor the SubNav entirely, we shouldn't have
|
|
20
|
+
* to do this hack to work a lock at the end. It's a bit hacky.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const CustomIcon = styled(Icon)`
|
|
24
|
+
right: 15px;
|
|
25
|
+
position: absolute;
|
|
26
|
+
`;
|
|
14
27
|
|
|
15
28
|
const SettingsNav = ({ menu }) => {
|
|
16
29
|
const { formatMessage } = useIntl();
|
|
@@ -60,6 +73,13 @@ const SettingsNav = ({ menu }) => {
|
|
|
60
73
|
key={link.id}
|
|
61
74
|
>
|
|
62
75
|
{formatMessage(link.intlLabel)}
|
|
76
|
+
{link?.lockIcon && (
|
|
77
|
+
<CustomIcon
|
|
78
|
+
width={`${15 / 16}rem`}
|
|
79
|
+
height={`${15 / 16}rem`}
|
|
80
|
+
as={Lock}
|
|
81
|
+
/>
|
|
82
|
+
)}
|
|
63
83
|
</SubNavLink>
|
|
64
84
|
);
|
|
65
85
|
})}
|
|
@@ -164,4 +164,37 @@ export const ROUTES_CE = [
|
|
|
164
164
|
to: '/settings/transfer-tokens/:id',
|
|
165
165
|
exact: true,
|
|
166
166
|
},
|
|
167
|
+
{
|
|
168
|
+
async Component() {
|
|
169
|
+
const component = await import(
|
|
170
|
+
/* webpackChunkName: "audit-logs-sales-page" */ './pages/AuditLogs/SalesPage'
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
return component;
|
|
174
|
+
},
|
|
175
|
+
to: '/settings/purchase-audit-logs',
|
|
176
|
+
exact: true,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
async Component() {
|
|
180
|
+
const component = await import(
|
|
181
|
+
/* webpackChunkName: "review-workflows-sales-page" */ './pages/ReviewWorkflows/SalesPage'
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
return component;
|
|
185
|
+
},
|
|
186
|
+
to: '/settings/purchase-review-workflows',
|
|
187
|
+
exact: true,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
async Component() {
|
|
191
|
+
const component = await import(
|
|
192
|
+
/* webpackChunkName: "sso-sales-page" */ './pages/SingleSignOn/SalesPage'
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
return component;
|
|
196
|
+
},
|
|
197
|
+
to: '/settings/purchase-single-sign-on',
|
|
198
|
+
exact: true,
|
|
199
|
+
},
|
|
167
200
|
];
|
|
@@ -8,8 +8,8 @@ import { Redirect, Route, Switch, useParams } from 'react-router-dom';
|
|
|
8
8
|
|
|
9
9
|
import { useSettingsMenu } from '../../hooks';
|
|
10
10
|
import { useEnterprise } from '../../hooks/useEnterprise';
|
|
11
|
-
import createRoute from '../../utils/createRoute';
|
|
12
|
-
import makeUniqueRoutes from '../../utils/makeUniqueRoutes';
|
|
11
|
+
import { createRoute } from '../../utils/createRoute';
|
|
12
|
+
import { makeUniqueRoutes } from '../../utils/makeUniqueRoutes';
|
|
13
13
|
|
|
14
14
|
import SettingsNav from './components/SettingsNav';
|
|
15
15
|
import { ROUTES_CE } from './constants';
|
package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ActionBoundRoutes/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Flex, GridItem, Typography } from '@strapi/design-system';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
|
|
6
|
-
import { useApiTokenPermissionsContext } from '../../../../../../../contexts/
|
|
6
|
+
import { useApiTokenPermissionsContext } from '../../../../../../../contexts/apiTokenPermissions';
|
|
7
7
|
import BoundRoute from '../BoundRoute';
|
|
8
8
|
|
|
9
9
|
const ActionBoundRoutes = () => {
|
|
@@ -17,7 +17,7 @@ import PropTypes from 'prop-types';
|
|
|
17
17
|
import { useIntl } from 'react-intl';
|
|
18
18
|
import styled from 'styled-components';
|
|
19
19
|
|
|
20
|
-
import { useApiTokenPermissionsContext } from '../../../../../../../contexts/
|
|
20
|
+
import { useApiTokenPermissionsContext } from '../../../../../../../contexts/apiTokenPermissions';
|
|
21
21
|
|
|
22
22
|
import CheckboxWrapper from './CheckBoxWrapper';
|
|
23
23
|
|
package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Permissions/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import React, { memo } from 'react';
|
|
|
3
3
|
import { Flex, Grid, GridItem, Typography } from '@strapi/design-system';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
|
|
6
|
-
import { useApiTokenPermissionsContext } from '../../../../../../../contexts/
|
|
6
|
+
import { useApiTokenPermissionsContext } from '../../../../../../../contexts/apiTokenPermissions';
|
|
7
7
|
import ActionBoundRoutes from '../ActionBoundRoutes';
|
|
8
8
|
import ContentTypesSection from '../ContenTypesSection';
|
|
9
9
|
|
|
@@ -18,8 +18,8 @@ import { useQuery } from 'react-query';
|
|
|
18
18
|
import { useSelector } from 'react-redux';
|
|
19
19
|
import { useHistory, useRouteMatch } from 'react-router-dom';
|
|
20
20
|
|
|
21
|
-
import { ApiTokenPermissionsContextProvider } from '../../../../../contexts/
|
|
22
|
-
import { formatAPIErrors } from '../../../../../utils';
|
|
21
|
+
import { ApiTokenPermissionsContextProvider } from '../../../../../contexts/apiTokenPermissions';
|
|
22
|
+
import { formatAPIErrors } from '../../../../../utils/formatAPIErrors';
|
|
23
23
|
import { selectAdminPermissions } from '../../../../App/selectors';
|
|
24
24
|
import { API_TOKEN_TYPE } from '../../../components/Tokens/constants';
|
|
25
25
|
import FormHead from '../../../components/Tokens/FormHead';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Box, Layout, Main, HeaderLayout, EmptyStateLayout } from '@strapi/design-system';
|
|
4
|
+
import { LinkButton } from '@strapi/design-system/v2';
|
|
5
|
+
import { ExternalLink, EmptyPermissions } from '@strapi/icons';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
const SalesPage = () => {
|
|
9
|
+
const { formatMessage } = useIntl();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Layout>
|
|
13
|
+
<Main>
|
|
14
|
+
<HeaderLayout
|
|
15
|
+
title={formatMessage({ id: 'global.auditLogs', defaultMessage: 'Audit Logs' })}
|
|
16
|
+
subtitle={formatMessage({
|
|
17
|
+
id: 'Settings.permissions.auditLogs.listview.header.subtitle',
|
|
18
|
+
defaultMessage: 'Logs of all the activities that happened in your environment',
|
|
19
|
+
})}
|
|
20
|
+
/>
|
|
21
|
+
<Box paddingLeft={10} paddingRight={10}>
|
|
22
|
+
<EmptyStateLayout
|
|
23
|
+
icon={<EmptyPermissions width="10rem" />}
|
|
24
|
+
content={formatMessage({
|
|
25
|
+
id: 'Settings.permissions.auditLogs.not-available',
|
|
26
|
+
defaultMessage:
|
|
27
|
+
'Audit Logs is only available as part of the Enterprise Edition. Upgrade to get a searchable and filterable display of all activities.',
|
|
28
|
+
})}
|
|
29
|
+
action={
|
|
30
|
+
<LinkButton
|
|
31
|
+
variant="default"
|
|
32
|
+
endIcon={<ExternalLink />}
|
|
33
|
+
href="https://strp.cc/45mbAdF"
|
|
34
|
+
isExternal
|
|
35
|
+
target="_blank"
|
|
36
|
+
>
|
|
37
|
+
{formatMessage({
|
|
38
|
+
id: 'global.learn-more',
|
|
39
|
+
defaultMessage: 'Learn more',
|
|
40
|
+
})}
|
|
41
|
+
</LinkButton>
|
|
42
|
+
}
|
|
43
|
+
/>
|
|
44
|
+
</Box>
|
|
45
|
+
</Main>
|
|
46
|
+
</Layout>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default SalesPage;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Box, Layout, Main, HeaderLayout, EmptyStateLayout } from '@strapi/design-system';
|
|
4
|
+
import { LinkButton } from '@strapi/design-system/v2';
|
|
5
|
+
import { ExternalLink, EmptyPermissions } from '@strapi/icons';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
const SalesPage = () => {
|
|
9
|
+
const { formatMessage } = useIntl();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Layout>
|
|
13
|
+
<Main>
|
|
14
|
+
<HeaderLayout
|
|
15
|
+
title={formatMessage({
|
|
16
|
+
id: 'Settings.review-workflows.list.page.title',
|
|
17
|
+
defaultMessage: 'Review Workflows',
|
|
18
|
+
})}
|
|
19
|
+
subtitle={formatMessage({
|
|
20
|
+
id: 'Settings.review-workflows.list.page.subtitle',
|
|
21
|
+
defaultMessage: 'Manage your content review process',
|
|
22
|
+
})}
|
|
23
|
+
/>
|
|
24
|
+
<Box paddingLeft={10} paddingRight={10}>
|
|
25
|
+
<EmptyStateLayout
|
|
26
|
+
icon={<EmptyPermissions width="10rem" />}
|
|
27
|
+
content={formatMessage({
|
|
28
|
+
id: 'Settings.review-workflows.not-available',
|
|
29
|
+
defaultMessage:
|
|
30
|
+
'Review Workflows is only available as part of the Enterprise Edition. Upgrade to create and manage workflows.',
|
|
31
|
+
})}
|
|
32
|
+
action={
|
|
33
|
+
<LinkButton
|
|
34
|
+
variant="default"
|
|
35
|
+
endIcon={<ExternalLink />}
|
|
36
|
+
href="https://strp.cc/3tdNfJqe"
|
|
37
|
+
isExternal
|
|
38
|
+
target="_blank"
|
|
39
|
+
>
|
|
40
|
+
{formatMessage({
|
|
41
|
+
id: 'global.learn-more',
|
|
42
|
+
defaultMessage: 'Learn more',
|
|
43
|
+
})}
|
|
44
|
+
</LinkButton>
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
</Box>
|
|
48
|
+
</Main>
|
|
49
|
+
</Layout>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default SalesPage;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Box, Layout, Main, HeaderLayout, EmptyStateLayout } from '@strapi/design-system';
|
|
4
|
+
import { LinkButton } from '@strapi/design-system/v2';
|
|
5
|
+
import { ExternalLink, EmptyPermissions } from '@strapi/icons';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
const SalesPage = () => {
|
|
9
|
+
const { formatMessage } = useIntl();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Layout>
|
|
13
|
+
<Main>
|
|
14
|
+
<HeaderLayout
|
|
15
|
+
title={formatMessage({
|
|
16
|
+
id: 'Settings.sso.title',
|
|
17
|
+
defaultMessage: 'Single Sign-On',
|
|
18
|
+
})}
|
|
19
|
+
subtitle={formatMessage({
|
|
20
|
+
id: 'Settings.sso.subTitle',
|
|
21
|
+
defaultMessage: 'Configure the settings for the Single Sign-On feature.',
|
|
22
|
+
})}
|
|
23
|
+
/>
|
|
24
|
+
<Box paddingLeft={10} paddingRight={10}>
|
|
25
|
+
<EmptyStateLayout
|
|
26
|
+
icon={<EmptyPermissions width="10rem" />}
|
|
27
|
+
content={formatMessage({
|
|
28
|
+
id: 'Settings.sso.not-available',
|
|
29
|
+
defaultMessage:
|
|
30
|
+
'SSO is only available as part of the Enterprise Edition. Upgrade to configure additional sign-in & sign-up methods for your administration panel.',
|
|
31
|
+
})}
|
|
32
|
+
action={
|
|
33
|
+
<LinkButton
|
|
34
|
+
variant="default"
|
|
35
|
+
endIcon={<ExternalLink />}
|
|
36
|
+
href="https://strp.cc/46Fk1BA"
|
|
37
|
+
isExternal
|
|
38
|
+
target="_blank"
|
|
39
|
+
>
|
|
40
|
+
{formatMessage({
|
|
41
|
+
id: 'global.learn-more',
|
|
42
|
+
defaultMessage: 'Learn more',
|
|
43
|
+
})}
|
|
44
|
+
</LinkButton>
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
</Box>
|
|
48
|
+
</Main>
|
|
49
|
+
</Layout>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default SalesPage;
|
|
@@ -19,7 +19,7 @@ import { useQuery } from 'react-query';
|
|
|
19
19
|
import { useSelector } from 'react-redux';
|
|
20
20
|
import { useHistory, useRouteMatch } from 'react-router-dom';
|
|
21
21
|
|
|
22
|
-
import { formatAPIErrors } from '../../../../../utils';
|
|
22
|
+
import { formatAPIErrors } from '../../../../../utils/formatAPIErrors';
|
|
23
23
|
import { selectAdminPermissions } from '../../../../App/selectors';
|
|
24
24
|
import { TRANSFER_TOKEN_TYPE } from '../../../components/Tokens/constants';
|
|
25
25
|
import FormHead from '../../../components/Tokens/FormHead';
|
|
@@ -34,7 +34,8 @@ import { useHistory, useRouteMatch } from 'react-router-dom';
|
|
|
34
34
|
|
|
35
35
|
import { useAdminUsers } from '../../../../../hooks/useAdminUsers';
|
|
36
36
|
import { useEnterprise } from '../../../../../hooks/useEnterprise';
|
|
37
|
-
import { formatAPIErrors
|
|
37
|
+
import { formatAPIErrors } from '../../../../../utils/formatAPIErrors';
|
|
38
|
+
import { getFullName } from '../../../../../utils/getFullName';
|
|
38
39
|
import { MagicLinkCE } from '../components/MagicLink';
|
|
39
40
|
import SelectRoles from '../components/SelectRoles';
|
|
40
41
|
import { editValidation } from '../utils/validations/users';
|
|
@@ -16,7 +16,7 @@ import PropTypes from 'prop-types';
|
|
|
16
16
|
import { useIntl } from 'react-intl';
|
|
17
17
|
import { useHistory } from 'react-router-dom';
|
|
18
18
|
|
|
19
|
-
import { getFullName } from '../../../../../../../utils';
|
|
19
|
+
import { getFullName } from '../../../../../../../utils/getFullName';
|
|
20
20
|
|
|
21
21
|
const TableRows = ({
|
|
22
22
|
canDelete,
|