@strapi/admin 4.1.6-alpha.0 → 4.1.7
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 +40 -42
- package/admin/src/components/AuthenticatedApp/utils/api.js +1 -1
- package/admin/src/components/AutoReloadOverlayBlockerProvider/Blocker.js +1 -1
- package/admin/src/components/GuidedTour/Homepage/index.js +2 -2
- package/admin/src/components/GuidedTour/Modal/components/Modal.js +1 -1
- package/admin/src/components/LeftMenu/index.js +2 -2
- package/admin/src/components/Providers/index.js +65 -32
- package/admin/src/components/Theme/index.js +11 -12
- package/admin/src/components/ThemeToggleProvider/index.js +66 -0
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +17 -3
- package/admin/src/content-manager/components/DynamicTable/CellContent/RelationMultiple/index.js +135 -0
- package/admin/src/content-manager/components/DynamicTable/CellContent/RelationSingle/index.js +32 -0
- package/admin/src/content-manager/components/DynamicTable/CellContent/RepeatableComponent/index.js +62 -0
- package/admin/src/content-manager/components/DynamicTable/CellContent/SingleComponent/index.js +37 -0
- package/admin/src/content-manager/components/DynamicTable/CellContent/index.js +52 -27
- package/admin/src/content-manager/components/DynamicTable/CellContent/utils/hasContent.js +60 -0
- package/admin/src/content-manager/components/DynamicTable/CellContent/utils/isSingleRelation.js +3 -0
- package/admin/src/content-manager/components/DynamicTable/TableRows/index.js +1 -1
- package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +42 -42
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/getAPIInnerError.js +18 -0
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/handleAPIError.js +15 -0
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/index.js +0 -1
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +21 -19
- package/admin/src/content-manager/components/InputUID/index.js +1 -5
- package/admin/src/content-manager/components/Inputs/index.js +8 -10
- package/admin/src/content-manager/components/RepeatableComponent/index.js +1 -4
- package/admin/src/content-manager/components/SelectMany/index.js +1 -1
- package/admin/src/content-manager/components/SelectOne/index.js +1 -1
- package/admin/src/content-manager/components/SelectWrapper/utils/getSelectStyles.js +3 -1
- package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +15 -3
- package/admin/src/content-manager/components/Wysiwyg/EditorStylesContainer.js +4 -2
- package/admin/src/content-manager/components/Wysiwyg/index.js +3 -4
- package/admin/src/content-manager/hooks/useFetchContentTypeLayout/utils/formatLayouts.js +23 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/FieldButtonContent.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/components/FormModal.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/components/ModalForm.js +6 -1
- package/admin/src/content-manager/pages/EditSettingsView/index.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/utils/layout.js +7 -1
- package/admin/src/content-manager/pages/EditView/DeleteLink/index.js +1 -4
- package/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/index.js +1 -4
- package/admin/src/content-manager/pages/EditView/Header/index.js +1 -1
- package/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js +1 -1
- package/admin/src/content-manager/pages/ListSettingsView/index.js +2 -2
- package/admin/src/content-manager/pages/ListView/actions.js +2 -1
- package/admin/src/content-manager/pages/ListView/index.js +2 -5
- package/admin/src/content-manager/pages/ListView/reducer.js +55 -21
- package/admin/src/content-manager/pages/ListView/selectors.js +3 -6
- package/admin/src/content-manager/pages/ListViewLayoutManager/index.js +1 -1
- package/admin/src/content-manager/testUtils/data.js +5 -1
- package/admin/src/content-manager/utils/checkIfAttributeIsDisplayable.js +1 -1
- package/admin/src/content-manager/utils/isFieldTypeNumber.js +3 -0
- package/admin/src/contexts/ThemeToggle/index.js +5 -0
- package/admin/src/contexts/index.js +1 -0
- package/admin/src/hooks/index.js +1 -0
- package/admin/src/hooks/useMenu/reducer.js +3 -3
- package/admin/src/hooks/useReleaseNotification/index.js +1 -1
- package/admin/src/hooks/useSettingsMenu/init.js +2 -2
- package/admin/src/hooks/useThemeToggle/index.js +10 -0
- package/admin/src/layouts/UnauthenticatedLayout/index.js +1 -1
- package/admin/src/pages/Admin/Onboarding/index.js +2 -2
- package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +1 -1
- package/admin/src/pages/AuthPage/components/Register/index.js +6 -6
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +3 -3
- package/admin/src/pages/HomePage/ContentBlocks.js +1 -1
- package/admin/src/pages/InstalledPluginsPage/Plugins.js +3 -3
- package/admin/src/pages/InstalledPluginsPage/index.js +1 -1
- package/admin/src/pages/MarketplacePage/components/PluginCard/InstallPluginButton.js +66 -0
- package/admin/src/pages/MarketplacePage/components/PluginCard/index.js +13 -36
- package/admin/src/pages/MarketplacePage/index.js +18 -2
- package/admin/src/pages/ProfilePage/index.js +79 -15
- package/admin/src/pages/ProfilePage/utils/api.js +4 -2
- package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +1 -1
- package/admin/src/pages/SettingsPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/LoadingView/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/DeleteButton/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsButton/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/index.js +6 -6
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +5 -5
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/layout.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/DynamicTable/TableRows/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/stepper.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +7 -7
- package/admin/src/pages/UseCasePage/index.js +2 -2
- package/admin/src/translations/ar.json +0 -6
- package/admin/src/translations/cs.json +0 -8
- package/admin/src/translations/de.json +0 -26
- package/admin/src/translations/dk.json +0 -53
- package/admin/src/translations/en.json +88 -101
- package/admin/src/translations/es.json +0 -53
- package/admin/src/translations/fr.json +0 -56
- package/admin/src/translations/he.json +0 -24
- package/admin/src/translations/hu.json +0 -53
- package/admin/src/translations/id.json +0 -21
- package/admin/src/translations/it.json +0 -22
- package/admin/src/translations/ja.json +0 -53
- package/admin/src/translations/ko.json +0 -56
- package/admin/src/translations/ms.json +0 -12
- package/admin/src/translations/nl.json +0 -53
- package/admin/src/translations/no.json +0 -22
- package/admin/src/translations/pl.json +0 -26
- package/admin/src/translations/pt-BR.json +0 -53
- package/admin/src/translations/pt.json +0 -13
- package/admin/src/translations/ru.json +0 -25
- package/admin/src/translations/sk.json +0 -21
- package/admin/src/translations/sv.json +0 -6
- package/admin/src/translations/th.json +0 -21
- package/admin/src/translations/tr.json +0 -13
- package/admin/src/translations/uk.json +0 -12
- package/admin/src/translations/vi.json +1 -10
- package/admin/src/translations/zh-Hans.json +0 -53
- package/admin/src/translations/zh.json +0 -56
- package/build/4362.d8299f0c.chunk.js +1 -0
- package/build/{6250.836851ca.chunk.js → 6404.3c2d0a81.chunk.js} +1 -1
- package/build/849.82c29ba7.chunk.js +1 -0
- package/build/9260.4233fae2.chunk.js +2 -0
- package/build/{9260.fa40c7bd.chunk.js.LICENSE.txt → 9260.4233fae2.chunk.js.LICENSE.txt} +0 -0
- package/build/Admin-authenticatedApp.61248de6.chunk.js +1 -0
- package/build/Admin_homePage.4a3aa22e.chunk.js +1 -0
- package/build/Admin_marketplace.4748c8f6.chunk.js +1 -0
- package/build/Admin_pluginsPage.89a96d29.chunk.js +1 -0
- package/build/Admin_profilePage.7869a07a.chunk.js +1 -0
- package/build/Admin_settingsPage.2763454c.chunk.js +1 -0
- package/build/admin-edit-roles-page.fbcc195d.chunk.js +1 -0
- package/build/admin-edit-users.91e8f5e4.chunk.js +1 -0
- package/build/admin-users.0a6acd73.chunk.js +1 -0
- package/build/api-tokens-create-page.76e13a35.chunk.js +1 -0
- package/build/api-tokens-edit-page.b3d48a7f.chunk.js +1 -0
- package/build/api-tokens-list-page.4e822ac8.chunk.js +1 -0
- package/build/ar-json.cc19c13c.chunk.js +1 -0
- package/build/content-manager.abde723b.chunk.js +1 -0
- package/build/{content-type-builder-translation-ar-json.f1fedc12.chunk.js → content-type-builder-translation-ar-json.ab0a0caa.chunk.js} +1 -1
- package/build/{content-type-builder-translation-cs-json.b593aef5.chunk.js → content-type-builder-translation-cs-json.e3913c9f.chunk.js} +1 -1
- package/build/content-type-builder-translation-de-json.5eb3135d.chunk.js +1 -0
- package/build/content-type-builder-translation-dk-json.52805572.chunk.js +1 -0
- package/build/content-type-builder-translation-en-json.e51b2ec3.chunk.js +1 -0
- package/build/{content-type-builder-translation-es-json.e42614fd.chunk.js → content-type-builder-translation-es-json.5a362abf.chunk.js} +1 -1
- package/build/content-type-builder-translation-fr-json.afd4a12f.chunk.js +1 -0
- package/build/content-type-builder-translation-id-json.4a21dfab.chunk.js +1 -0
- package/build/content-type-builder-translation-it-json.4fa203b1.chunk.js +1 -0
- package/build/{content-type-builder-translation-ja-json.1459fb88.chunk.js → content-type-builder-translation-ja-json.cbb3b88a.chunk.js} +1 -1
- package/build/content-type-builder-translation-ko-json.7daf86c3.chunk.js +1 -0
- package/build/{content-type-builder-translation-ms-json.3dd46b39.chunk.js → content-type-builder-translation-ms-json.3755f8c8.chunk.js} +1 -1
- package/build/{content-type-builder-translation-nl-json.877dff80.chunk.js → content-type-builder-translation-nl-json.6f8d924b.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pl-json.95b2b33d.chunk.js → content-type-builder-translation-pl-json.fc0b0c20.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-BR-json.d311d056.chunk.js → content-type-builder-translation-pt-BR-json.86b192fa.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-json.4893266f.chunk.js → content-type-builder-translation-pt-json.b584f79f.chunk.js} +1 -1
- package/build/content-type-builder-translation-ru-json.7648049a.chunk.js +1 -0
- package/build/{content-type-builder-translation-sk-json.eb4930b0.chunk.js → content-type-builder-translation-sk-json.c12a8dec.chunk.js} +1 -1
- package/build/content-type-builder-translation-th-json.668cd5f5.chunk.js +1 -0
- package/build/{content-type-builder-translation-tr-json.696283a5.chunk.js → content-type-builder-translation-tr-json.0f52e1e8.chunk.js} +1 -1
- package/build/content-type-builder-translation-uk-json.4bf80448.chunk.js +1 -0
- package/build/{content-type-builder-translation-zh-Hans-json.c70a6a4a.chunk.js → content-type-builder-translation-zh-Hans-json.76e58138.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-json.6fe1861a.chunk.js → content-type-builder-translation-zh-json.0bec81f1.chunk.js} +1 -1
- package/build/content-type-builder.19ae7eef.chunk.js +1 -0
- package/build/cs-json.ce6f2e52.chunk.js +1 -0
- package/build/de-json.2087d61e.chunk.js +1 -0
- package/build/dk-json.fb9ee45a.chunk.js +1 -0
- package/build/{email-settings-page.27ee4a98.chunk.js → email-settings-page.40ee2bda.chunk.js} +1 -1
- package/build/en-json.94e6ed8a.chunk.js +1 -0
- package/build/es-json.8f4d89e2.chunk.js +1 -0
- package/build/fr-json.2a0b93ed.chunk.js +1 -0
- package/build/he-json.917d416c.chunk.js +1 -0
- package/build/hu-json.bee23c51.chunk.js +1 -0
- package/build/{i18n-settings-page.c4018651.chunk.js → i18n-settings-page.1f6be747.chunk.js} +1 -1
- package/build/i18n-translation-de-json.96ae1f68.chunk.js +1 -0
- package/build/id-json.fef679cb.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/it-json.937b2108.chunk.js +1 -0
- package/build/ja-json.b4818378.chunk.js +1 -0
- package/build/ko-json.8294a7fc.chunk.js +1 -0
- package/build/{main.a8c2970b.js → main.cd1c939f.js} +2 -2
- package/build/{main.a8c2970b.js.LICENSE.txt → main.cd1c939f.js.LICENSE.txt} +0 -0
- package/build/ms-json.f46167ef.chunk.js +1 -0
- package/build/nl-json.86eae27d.chunk.js +1 -0
- package/build/no-json.17ecda5d.chunk.js +1 -0
- package/build/pl-json.0db77f2c.chunk.js +1 -0
- package/build/pt-BR-json.4c90cb2d.chunk.js +1 -0
- package/build/pt-json.ef0efd89.chunk.js +1 -0
- package/build/ru-json.da33236d.chunk.js +1 -0
- package/build/{runtime~main.4dafb29d.js → runtime~main.c5ab8a8f.js} +1 -1
- package/build/sk-json.797e898f.chunk.js +1 -0
- package/build/sso-settings-page.c5dda65d.chunk.js +1 -0
- package/build/sv-json.5bbe6a4f.chunk.js +1 -0
- package/build/th-json.c1393c06.chunk.js +1 -0
- package/build/tr-json.57cde8b0.chunk.js +1 -0
- package/build/uk-json.c6df66d2.chunk.js +1 -0
- package/build/{upload-settings.4401f36d.chunk.js → upload-settings.9d3231f4.chunk.js} +1 -1
- package/build/upload-translation-de-json.55a7e43a.chunk.js +1 -0
- package/build/upload-translation-dk-json.b74134c8.chunk.js +1 -0
- package/build/upload-translation-en-json.c4e56528.chunk.js +1 -0
- package/build/upload-translation-es-json.15a3015f.chunk.js +1 -0
- package/build/upload-translation-fr-json.b12f7247.chunk.js +1 -0
- package/build/upload-translation-he-json.bee013d1.chunk.js +1 -0
- package/build/upload-translation-it-json.43ec0a8d.chunk.js +1 -0
- package/build/upload-translation-ja-json.03f1af04.chunk.js +1 -0
- package/build/upload-translation-ko-json.08ad9013.chunk.js +1 -0
- package/build/upload-translation-ms-json.30974c82.chunk.js +1 -0
- package/build/upload-translation-pl-json.3740abed.chunk.js +1 -0
- package/build/upload-translation-pt-BR-json.c7656183.chunk.js +1 -0
- package/build/upload-translation-ru-json.0dd4f526.chunk.js +1 -0
- package/build/upload-translation-sk-json.55cacd22.chunk.js +1 -0
- package/build/upload-translation-th-json.f7aa9392.chunk.js +1 -0
- package/build/upload-translation-uk-json.696a16f3.chunk.js +1 -0
- package/build/upload-translation-zh-Hans-json.de7bc63f.chunk.js +1 -0
- package/build/upload-translation-zh-json.bbc1ed41.chunk.js +1 -0
- package/build/{upload.5a2dded7.chunk.js → upload.8edef1ea.chunk.js} +1 -1
- package/build/{users-advanced-settings-page.8905d8d8.chunk.js → users-advanced-settings-page.48c437f0.chunk.js} +1 -1
- package/build/users-email-settings-page.f39866d6.chunk.js +1 -0
- package/build/users-permissions-translation-ar-json.667e7eee.chunk.js +1 -0
- package/build/users-permissions-translation-cs-json.995b5d76.chunk.js +1 -0
- package/build/users-permissions-translation-de-json.a5c8db9c.chunk.js +1 -0
- package/build/users-permissions-translation-dk-json.1fe5e07a.chunk.js +1 -0
- package/build/users-permissions-translation-en-json.0e0bc290.chunk.js +1 -0
- package/build/users-permissions-translation-es-json.05669296.chunk.js +1 -0
- package/build/users-permissions-translation-fr-json.3e3522c3.chunk.js +1 -0
- package/build/users-permissions-translation-id-json.186a3f65.chunk.js +1 -0
- package/build/users-permissions-translation-it-json.ee5742c4.chunk.js +1 -0
- package/build/users-permissions-translation-ja-json.c9cafa6e.chunk.js +1 -0
- package/build/users-permissions-translation-ko-json.170f89c2.chunk.js +1 -0
- package/build/users-permissions-translation-ms-json.3a128ff4.chunk.js +1 -0
- package/build/users-permissions-translation-nl-json.4146aed1.chunk.js +1 -0
- package/build/users-permissions-translation-pl-json.a61de7ed.chunk.js +1 -0
- package/build/users-permissions-translation-pt-BR-json.51b1cc15.chunk.js +1 -0
- package/build/users-permissions-translation-pt-json.85f0e0e1.chunk.js +1 -0
- package/build/users-permissions-translation-ru-json.a19b2400.chunk.js +1 -0
- package/build/users-permissions-translation-sk-json.27af7260.chunk.js +1 -0
- package/build/users-permissions-translation-sv-json.739657b9.chunk.js +1 -0
- package/build/users-permissions-translation-th-json.f001fff3.chunk.js +1 -0
- package/build/users-permissions-translation-tr-json.3aae5dda.chunk.js +1 -0
- package/build/users-permissions-translation-uk-json.a66c7a8c.chunk.js +1 -0
- package/build/users-permissions-translation-vi-json.685c65cc.chunk.js +1 -0
- package/build/users-permissions-translation-zh-Hans-json.2202741e.chunk.js +1 -0
- package/build/users-permissions-translation-zh-json.429a3190.chunk.js +1 -0
- package/build/users-providers-settings-page.574ed765.chunk.js +1 -0
- package/build/{users-roles-settings-page.a2f6277a.chunk.js → users-roles-settings-page.b836dc30.chunk.js} +1 -1
- package/build/vi-json.104a6f3a.chunk.js +1 -0
- package/build/webhook-edit-page.b791c6f9.chunk.js +1 -0
- package/build/{webhook-list-page.c21b5a9a.chunk.js → webhook-list-page.502d1236.chunk.js} +1 -1
- package/build/zh-Hans-json.9afc1adf.chunk.js +1 -0
- package/build/zh-json.f36abb77.chunk.js +1 -0
- package/ee/admin/pages/AuthPage/components/Providers/SSOProviders.js +1 -1
- package/ee/admin/pages/SettingsPage/SingleSignOn/index.js +2 -2
- package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +5 -5
- package/ee/admin/pages/SettingsPage/pages/Roles/ListPage/index.js +6 -6
- package/package.json +5 -5
- package/scripts/build.js +15 -1
- package/server/validation/permission.js +5 -1
- package/admin/src/content-manager/components/DynamicTable/CellContent/Relation/PopoverContent.js +0 -87
- package/admin/src/content-manager/components/DynamicTable/CellContent/Relation/index.js +0 -107
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/getYupInnerErrors.js +0 -17
- package/admin/src/themes/colors.js +0 -51
- package/admin/src/themes/fontWeights.js +0 -8
- package/admin/src/themes/index.js +0 -13
- package/admin/src/themes/sizes.js +0 -31
- package/build/4362.cf5b578d.chunk.js +0 -1
- package/build/849.98171304.chunk.js +0 -1
- package/build/9260.fa40c7bd.chunk.js +0 -2
- package/build/Admin-authenticatedApp.f7f4f112.chunk.js +0 -1
- package/build/Admin_homePage.fea90263.chunk.js +0 -1
- package/build/Admin_marketplace.89a0a014.chunk.js +0 -1
- package/build/Admin_pluginsPage.97a514db.chunk.js +0 -1
- package/build/Admin_profilePage.c497b39d.chunk.js +0 -1
- package/build/Admin_settingsPage.55ec1f30.chunk.js +0 -1
- package/build/admin-edit-roles-page.49b6f01d.chunk.js +0 -1
- package/build/admin-edit-users.381e4a0d.chunk.js +0 -1
- package/build/admin-users.2740c223.chunk.js +0 -1
- package/build/api-tokens-create-page.db17bb39.chunk.js +0 -1
- package/build/api-tokens-edit-page.c7299a77.chunk.js +0 -1
- package/build/api-tokens-list-page.26a05a21.chunk.js +0 -1
- package/build/ar-json.6a2565af.chunk.js +0 -1
- package/build/content-manager.94860c70.chunk.js +0 -1
- package/build/content-type-builder-translation-de-json.bf808f88.chunk.js +0 -1
- package/build/content-type-builder-translation-dk-json.28ed91d2.chunk.js +0 -1
- package/build/content-type-builder-translation-en-json.f19ac2e9.chunk.js +0 -1
- package/build/content-type-builder-translation-fr-json.bee621f7.chunk.js +0 -1
- package/build/content-type-builder-translation-id-json.dc5ea5d6.chunk.js +0 -1
- package/build/content-type-builder-translation-it-json.3c8ca035.chunk.js +0 -1
- package/build/content-type-builder-translation-ko-json.48ee9cec.chunk.js +0 -1
- package/build/content-type-builder-translation-ru-json.b76aa5ab.chunk.js +0 -1
- package/build/content-type-builder-translation-th-json.23555d01.chunk.js +0 -1
- package/build/content-type-builder-translation-uk-json.ff0523b6.chunk.js +0 -1
- package/build/content-type-builder.a963330a.chunk.js +0 -1
- package/build/cs-json.8df09876.chunk.js +0 -1
- package/build/de-json.6e14f607.chunk.js +0 -1
- package/build/dk-json.be388470.chunk.js +0 -1
- package/build/en-json.2bc27a3d.chunk.js +0 -1
- package/build/es-json.61553168.chunk.js +0 -1
- package/build/fr-json.a9ce0700.chunk.js +0 -1
- package/build/he-json.1742494e.chunk.js +0 -1
- package/build/hu-json.e667d285.chunk.js +0 -1
- package/build/i18n-translation-de-json.c5c9054f.chunk.js +0 -1
- package/build/id-json.d87ebb20.chunk.js +0 -1
- package/build/it-json.a2880b81.chunk.js +0 -1
- package/build/ja-json.e13f04e8.chunk.js +0 -1
- package/build/ko-json.2200c9c9.chunk.js +0 -1
- package/build/ms-json.3a062984.chunk.js +0 -1
- package/build/nl-json.30ce02cb.chunk.js +0 -1
- package/build/no-json.9af40e9d.chunk.js +0 -1
- package/build/pl-json.fd373053.chunk.js +0 -1
- package/build/pt-BR-json.30e2d716.chunk.js +0 -1
- package/build/pt-json.3aaf9e05.chunk.js +0 -1
- package/build/ru-json.78c56e1c.chunk.js +0 -1
- package/build/sk-json.c0bf144c.chunk.js +0 -1
- package/build/sso-settings-page.121dd0a6.chunk.js +0 -1
- package/build/sv-json.aad187b9.chunk.js +0 -1
- package/build/th-json.e2b4a0fb.chunk.js +0 -1
- package/build/tr-json.0add11cd.chunk.js +0 -1
- package/build/uk-json.eb78e77e.chunk.js +0 -1
- package/build/upload-translation-de-json.1308dce5.chunk.js +0 -1
- package/build/upload-translation-dk-json.0d4e855f.chunk.js +0 -1
- package/build/upload-translation-en-json.c334dd82.chunk.js +0 -1
- package/build/upload-translation-es-json.81b13eac.chunk.js +0 -1
- package/build/upload-translation-fr-json.1bec79ec.chunk.js +0 -1
- package/build/upload-translation-he-json.1d28982f.chunk.js +0 -1
- package/build/upload-translation-it-json.7d4bdc5a.chunk.js +0 -1
- package/build/upload-translation-ja-json.97fcacd8.chunk.js +0 -1
- package/build/upload-translation-ko-json.d7345fe1.chunk.js +0 -1
- package/build/upload-translation-ms-json.081effd5.chunk.js +0 -1
- package/build/upload-translation-pl-json.2dfe78bb.chunk.js +0 -1
- package/build/upload-translation-pt-BR-json.65936d7b.chunk.js +0 -1
- package/build/upload-translation-ru-json.2d3b6f69.chunk.js +0 -1
- package/build/upload-translation-sk-json.f15c7fd6.chunk.js +0 -1
- package/build/upload-translation-th-json.6d3c2370.chunk.js +0 -1
- package/build/upload-translation-uk-json.a6c38449.chunk.js +0 -1
- package/build/upload-translation-zh-Hans-json.f6b26c45.chunk.js +0 -1
- package/build/upload-translation-zh-json.06052336.chunk.js +0 -1
- package/build/users-email-settings-page.862eb51e.chunk.js +0 -1
- package/build/users-permissions-translation-ar-json.bdddd0d7.chunk.js +0 -1
- package/build/users-permissions-translation-cs-json.7881d3ff.chunk.js +0 -1
- package/build/users-permissions-translation-de-json.8d53c619.chunk.js +0 -1
- package/build/users-permissions-translation-dk-json.89d41c4b.chunk.js +0 -1
- package/build/users-permissions-translation-en-json.21b0fd2f.chunk.js +0 -1
- package/build/users-permissions-translation-es-json.a4f81eaa.chunk.js +0 -1
- package/build/users-permissions-translation-fr-json.a2172545.chunk.js +0 -1
- package/build/users-permissions-translation-id-json.8f17982a.chunk.js +0 -1
- package/build/users-permissions-translation-it-json.87952a24.chunk.js +0 -1
- package/build/users-permissions-translation-ja-json.5915d9ef.chunk.js +0 -1
- package/build/users-permissions-translation-ko-json.f1ca6cc4.chunk.js +0 -1
- package/build/users-permissions-translation-ms-json.2268324c.chunk.js +0 -1
- package/build/users-permissions-translation-nl-json.4e1231dd.chunk.js +0 -1
- package/build/users-permissions-translation-pl-json.107638b5.chunk.js +0 -1
- package/build/users-permissions-translation-pt-BR-json.8dafc053.chunk.js +0 -1
- package/build/users-permissions-translation-pt-json.3322464f.chunk.js +0 -1
- package/build/users-permissions-translation-ru-json.5709c5a0.chunk.js +0 -1
- package/build/users-permissions-translation-sk-json.fe7cc044.chunk.js +0 -1
- package/build/users-permissions-translation-sv-json.e7e1684b.chunk.js +0 -1
- package/build/users-permissions-translation-th-json.bb544ee3.chunk.js +0 -1
- package/build/users-permissions-translation-tr-json.30f3ca90.chunk.js +0 -1
- package/build/users-permissions-translation-uk-json.634f2569.chunk.js +0 -1
- package/build/users-permissions-translation-vi-json.605d88bc.chunk.js +0 -1
- package/build/users-permissions-translation-zh-Hans-json.85480dab.chunk.js +0 -1
- package/build/users-permissions-translation-zh-json.99932731.chunk.js +0 -1
- package/build/users-providers-settings-page.368893ed.chunk.js +0 -1
- package/build/vi-json.1e850069.chunk.js +0 -1
- package/build/webhook-edit-page.d170eda1.chunk.js +0 -1
- package/build/zh-Hans-json.55f6475b.chunk.js +0 -1
- package/build/zh-json.c3c2b225.chunk.js +0 -1
|
@@ -10,7 +10,7 @@ const initialState = {
|
|
|
10
10
|
{
|
|
11
11
|
icon: Puzzle,
|
|
12
12
|
intlLabel: {
|
|
13
|
-
id: '
|
|
13
|
+
id: 'global.plugins',
|
|
14
14
|
defaultMessage: 'Plugins',
|
|
15
15
|
},
|
|
16
16
|
to: '/list-plugins',
|
|
@@ -19,7 +19,7 @@ const initialState = {
|
|
|
19
19
|
{
|
|
20
20
|
icon: ShoppingCart,
|
|
21
21
|
intlLabel: {
|
|
22
|
-
id: '
|
|
22
|
+
id: 'global.marketplace',
|
|
23
23
|
defaultMessage: 'Marketplace',
|
|
24
24
|
},
|
|
25
25
|
to: '/marketplace',
|
|
@@ -28,7 +28,7 @@ const initialState = {
|
|
|
28
28
|
{
|
|
29
29
|
icon: Cog,
|
|
30
30
|
intlLabel: {
|
|
31
|
-
id: '
|
|
31
|
+
id: 'global.settings',
|
|
32
32
|
defaultMessage: 'Settings',
|
|
33
33
|
},
|
|
34
34
|
to: '/settings',
|
|
@@ -25,14 +25,14 @@ const init = (initialState, { settings, shouldUpdateStrapi }) => {
|
|
|
25
25
|
intlLabel: { id: 'Settings.permissions', defaultMessage: 'Administration Panel' },
|
|
26
26
|
links: [
|
|
27
27
|
{
|
|
28
|
-
intlLabel: { id: '
|
|
28
|
+
intlLabel: { id: 'global.roles', defaultMessage: 'Roles' },
|
|
29
29
|
to: '/settings/roles',
|
|
30
30
|
id: 'roles',
|
|
31
31
|
isDisplayed: false,
|
|
32
32
|
permissions: adminPermissions.settings.roles.main,
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
intlLabel: { id: '
|
|
35
|
+
intlLabel: { id: 'global.users' },
|
|
36
36
|
// Init the search params directly
|
|
37
37
|
to: '/settings/users?pageSize=10&page=1&sort=firstname',
|
|
38
38
|
id: 'users',
|
|
@@ -21,7 +21,7 @@ const Button = styled.button`
|
|
|
21
21
|
box-shadow: ${({ theme }) => theme.shadows.tableShadow};
|
|
22
22
|
border-radius: 50%;
|
|
23
23
|
svg {
|
|
24
|
-
color: ${({ theme }) => theme.colors.
|
|
24
|
+
color: ${({ theme }) => theme.colors.buttonNeutral0};
|
|
25
25
|
}
|
|
26
26
|
`;
|
|
27
27
|
|
|
@@ -75,7 +75,7 @@ const Onboarding = () => {
|
|
|
75
75
|
{
|
|
76
76
|
icon: 'book',
|
|
77
77
|
label: formatMessage({
|
|
78
|
-
id: '
|
|
78
|
+
id: 'global.documentation',
|
|
79
79
|
defaultMessage: 'Documentation',
|
|
80
80
|
}),
|
|
81
81
|
destination: 'https://docs.strapi.io',
|
|
@@ -107,7 +107,7 @@ const Login = ({ onSubmit, schema, children }) => {
|
|
|
107
107
|
onChange={handleChange}
|
|
108
108
|
value={values.password}
|
|
109
109
|
label={formatMessage({
|
|
110
|
-
id: '
|
|
110
|
+
id: 'global.password',
|
|
111
111
|
defaultMessage: 'Password',
|
|
112
112
|
})}
|
|
113
113
|
name="password"
|
|
@@ -143,7 +143,7 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
143
143
|
<Typography as="h1" variant="alpha">
|
|
144
144
|
{formatMessage({
|
|
145
145
|
id: 'Auth.form.welcome.title',
|
|
146
|
-
defaultMessage: 'Welcome!',
|
|
146
|
+
defaultMessage: 'Welcome to Strapi!',
|
|
147
147
|
})}
|
|
148
148
|
</Typography>
|
|
149
149
|
</Box>
|
|
@@ -152,12 +152,12 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
152
152
|
{formatMessage({
|
|
153
153
|
id: 'Auth.form.register.subtitle',
|
|
154
154
|
defaultMessage:
|
|
155
|
-
'
|
|
155
|
+
'Credentials are only used to authenticate in Strapi. All saved data will be stored in your database.',
|
|
156
156
|
})}
|
|
157
157
|
</Typography>
|
|
158
158
|
</CenteredBox>
|
|
159
159
|
</Column>
|
|
160
|
-
<Stack spacing={
|
|
160
|
+
<Stack spacing={6}>
|
|
161
161
|
<Grid gap={4}>
|
|
162
162
|
<GridItem col={6}>
|
|
163
163
|
<TextInput
|
|
@@ -227,11 +227,11 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
227
227
|
hint={formatMessage({
|
|
228
228
|
id: 'Auth.form.password.hint',
|
|
229
229
|
defaultMessage:
|
|
230
|
-
'
|
|
230
|
+
'Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number',
|
|
231
231
|
})}
|
|
232
232
|
required
|
|
233
233
|
label={formatMessage({
|
|
234
|
-
id: '
|
|
234
|
+
id: 'global.password',
|
|
235
235
|
defaultMessage: 'Password',
|
|
236
236
|
})}
|
|
237
237
|
type={passwordShown ? 'text' : 'password'}
|
|
@@ -284,7 +284,7 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
284
284
|
{
|
|
285
285
|
id: 'Auth.form.register.news.label',
|
|
286
286
|
defaultMessage:
|
|
287
|
-
'Keep me updated about
|
|
287
|
+
'Keep me updated about new features & upcoming improvements (by doing this you accept the {terms} and the {policy}).',
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
terms: (
|
|
@@ -53,7 +53,7 @@ const ForgotPassword = ({ onSubmit, schema }) => {
|
|
|
53
53
|
<Box paddingTop={6} paddingBottom={7}>
|
|
54
54
|
<Typography as="h1" variant="alpha">
|
|
55
55
|
{formatMessage({
|
|
56
|
-
id: '
|
|
56
|
+
id: 'global.reset-password',
|
|
57
57
|
defaultMessage: 'Reset password',
|
|
58
58
|
})}
|
|
59
59
|
</Typography>
|
|
@@ -114,7 +114,7 @@ const ForgotPassword = ({ onSubmit, schema }) => {
|
|
|
114
114
|
})}
|
|
115
115
|
required
|
|
116
116
|
label={formatMessage({
|
|
117
|
-
id: '
|
|
117
|
+
id: 'global.password',
|
|
118
118
|
defaultMessage: 'Password',
|
|
119
119
|
})}
|
|
120
120
|
type={passwordShown ? 'text' : 'password'}
|
|
@@ -161,7 +161,7 @@ const ForgotPassword = ({ onSubmit, schema }) => {
|
|
|
161
161
|
/>
|
|
162
162
|
<Button fullwidth type="submit">
|
|
163
163
|
{formatMessage({
|
|
164
|
-
id: '
|
|
164
|
+
id: 'global.change-password',
|
|
165
165
|
defaultMessage: 'Change password',
|
|
166
166
|
})}
|
|
167
167
|
</Button>
|
|
@@ -14,7 +14,7 @@ const Plugins = () => {
|
|
|
14
14
|
useFocusWhenNavigate();
|
|
15
15
|
|
|
16
16
|
const title = formatMessage({
|
|
17
|
-
id: '
|
|
17
|
+
id: 'global.plugins',
|
|
18
18
|
defaultMessage: 'Plugins',
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -61,7 +61,7 @@ const Plugins = () => {
|
|
|
61
61
|
<Th>
|
|
62
62
|
<Typography variant="sigma" textColor="neutral600">
|
|
63
63
|
{formatMessage({
|
|
64
|
-
id: '
|
|
64
|
+
id: 'global.name',
|
|
65
65
|
defaultMessage: 'Name',
|
|
66
66
|
})}
|
|
67
67
|
</Typography>
|
|
@@ -69,7 +69,7 @@ const Plugins = () => {
|
|
|
69
69
|
<Th>
|
|
70
70
|
<Typography variant="sigma" textColor="neutral600">
|
|
71
71
|
{formatMessage({
|
|
72
|
-
id: '
|
|
72
|
+
id: 'global.description',
|
|
73
73
|
defaultMessage: 'description',
|
|
74
74
|
})}
|
|
75
75
|
</Typography>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
5
|
+
import { useNotification, useTracking } from '@strapi/helper-plugin';
|
|
6
|
+
import { Box } from '@strapi/design-system/Box';
|
|
7
|
+
import { Icon } from '@strapi/design-system/Icon';
|
|
8
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
9
|
+
import Check from '@strapi/icons/Check';
|
|
10
|
+
import Duplicate from '@strapi/icons/Duplicate';
|
|
11
|
+
import { Button } from '@strapi/design-system/Button';
|
|
12
|
+
|
|
13
|
+
const InstallPluginButton = ({ isInstalled, isInDevelopmentMode, commandToCopy }) => {
|
|
14
|
+
const toggleNotification = useNotification();
|
|
15
|
+
const { formatMessage } = useIntl();
|
|
16
|
+
const { trackUsage } = useTracking();
|
|
17
|
+
|
|
18
|
+
// Already installed
|
|
19
|
+
if (isInstalled) {
|
|
20
|
+
return (
|
|
21
|
+
<Box paddingLeft={4}>
|
|
22
|
+
<Icon as={Check} marginRight={2} width={12} height={12} color="success600" />
|
|
23
|
+
<Typography variant="omega" textColor="success600" fontWeight="bold">
|
|
24
|
+
{formatMessage({
|
|
25
|
+
id: 'admin.pages.MarketPlacePage.plugin.installed',
|
|
26
|
+
defaultMessage: 'Installed',
|
|
27
|
+
})}
|
|
28
|
+
</Typography>
|
|
29
|
+
</Box>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// In development, show install button
|
|
34
|
+
if (isInDevelopmentMode) {
|
|
35
|
+
return (
|
|
36
|
+
<CopyToClipboard
|
|
37
|
+
onCopy={() => {
|
|
38
|
+
trackUsage('willInstallPlugin');
|
|
39
|
+
toggleNotification({
|
|
40
|
+
type: 'success',
|
|
41
|
+
message: { id: 'admin.pages.MarketPlacePage.plugin.copy.success' },
|
|
42
|
+
});
|
|
43
|
+
}}
|
|
44
|
+
text={commandToCopy}
|
|
45
|
+
>
|
|
46
|
+
<Button size="S" startIcon={<Duplicate />} variant="secondary">
|
|
47
|
+
{formatMessage({
|
|
48
|
+
id: 'admin.pages.MarketPlacePage.plugin.copy',
|
|
49
|
+
defaultMessage: 'Copy install command',
|
|
50
|
+
})}
|
|
51
|
+
</Button>
|
|
52
|
+
</CopyToClipboard>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Not in development and plugin not installed already. Show nothing
|
|
57
|
+
return null;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
InstallPluginButton.propTypes = {
|
|
61
|
+
isInstalled: PropTypes.bool.isRequired,
|
|
62
|
+
isInDevelopmentMode: PropTypes.bool.isRequired,
|
|
63
|
+
commandToCopy: PropTypes.string.isRequired,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export default InstallPluginButton;
|
|
@@ -5,18 +5,15 @@ import styled from 'styled-components';
|
|
|
5
5
|
import { Box } from '@strapi/design-system/Box';
|
|
6
6
|
import { Stack } from '@strapi/design-system/Stack';
|
|
7
7
|
import { Typography } from '@strapi/design-system/Typography';
|
|
8
|
-
import { Button } from '@strapi/design-system/Button';
|
|
9
8
|
import { LinkButton } from '@strapi/design-system/LinkButton';
|
|
10
9
|
import { Flex } from '@strapi/design-system/Flex';
|
|
11
10
|
import { Icon } from '@strapi/design-system/Icon';
|
|
12
11
|
import { Tooltip } from '@strapi/design-system/Tooltip';
|
|
13
12
|
import ExternalLink from '@strapi/icons/ExternalLink';
|
|
14
|
-
import Duplicate from '@strapi/icons/Duplicate';
|
|
15
|
-
import Check from '@strapi/icons/Check';
|
|
16
13
|
import CheckCircle from '@strapi/icons/CheckCircle';
|
|
17
|
-
import {
|
|
18
|
-
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
14
|
+
import { useTracking } from '@strapi/helper-plugin';
|
|
19
15
|
import madeByStrapiIcon from '../../../../assets/images/icon_made-by-strapi.svg';
|
|
16
|
+
import InstallPluginButton from './InstallPluginButton';
|
|
20
17
|
|
|
21
18
|
// Custom component to have an ellipsis after the 2nd line
|
|
22
19
|
const EllipsisText = styled(Typography)`
|
|
@@ -28,10 +25,9 @@ const EllipsisText = styled(Typography)`
|
|
|
28
25
|
overflow: hidden;
|
|
29
26
|
`;
|
|
30
27
|
|
|
31
|
-
const PluginCard = ({ plugin, installedPluginNames, useYarn }) => {
|
|
28
|
+
const PluginCard = ({ plugin, installedPluginNames, useYarn, isInDevelopmentMode }) => {
|
|
32
29
|
const { attributes } = plugin;
|
|
33
30
|
const { formatMessage } = useIntl();
|
|
34
|
-
const toggleNotification = useNotification();
|
|
35
31
|
const { trackUsage } = useTracking();
|
|
36
32
|
|
|
37
33
|
const isInstalled = installedPluginNames.includes(attributes.npmPackageName);
|
|
@@ -128,40 +124,20 @@ const PluginCard = ({ plugin, installedPluginNames, useYarn }) => {
|
|
|
128
124
|
defaultMessage: 'Learn more',
|
|
129
125
|
})}
|
|
130
126
|
</LinkButton>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
id: 'admin.pages.MarketPlacePage.plugin.installed',
|
|
137
|
-
defaultMessage: 'Installed',
|
|
138
|
-
})}
|
|
139
|
-
</Typography>
|
|
140
|
-
</Box>
|
|
141
|
-
) : (
|
|
142
|
-
<CopyToClipboard
|
|
143
|
-
onCopy={() => {
|
|
144
|
-
trackUsage('willInstallPlugin');
|
|
145
|
-
toggleNotification({
|
|
146
|
-
type: 'success',
|
|
147
|
-
message: { id: 'admin.pages.MarketPlacePage.plugin.copy.success' },
|
|
148
|
-
});
|
|
149
|
-
}}
|
|
150
|
-
text={commandToCopy}
|
|
151
|
-
>
|
|
152
|
-
<Button size="S" startIcon={<Duplicate />} variant="secondary">
|
|
153
|
-
{formatMessage({
|
|
154
|
-
id: 'admin.pages.MarketPlacePage.plugin.copy',
|
|
155
|
-
defaultMessage: 'Copy install command',
|
|
156
|
-
})}
|
|
157
|
-
</Button>
|
|
158
|
-
</CopyToClipboard>
|
|
159
|
-
)}
|
|
127
|
+
<InstallPluginButton
|
|
128
|
+
isInstalled={isInstalled}
|
|
129
|
+
isInDevelopmentMode={isInDevelopmentMode}
|
|
130
|
+
commandToCopy={commandToCopy}
|
|
131
|
+
/>
|
|
160
132
|
</Stack>
|
|
161
133
|
</Flex>
|
|
162
134
|
);
|
|
163
135
|
};
|
|
164
136
|
|
|
137
|
+
PluginCard.defaultProps = {
|
|
138
|
+
isInDevelopmentMode: false,
|
|
139
|
+
};
|
|
140
|
+
|
|
165
141
|
PluginCard.propTypes = {
|
|
166
142
|
plugin: PropTypes.shape({
|
|
167
143
|
id: PropTypes.string.isRequired,
|
|
@@ -181,6 +157,7 @@ PluginCard.propTypes = {
|
|
|
181
157
|
}).isRequired,
|
|
182
158
|
installedPluginNames: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
183
159
|
useYarn: PropTypes.bool.isRequired,
|
|
160
|
+
isInDevelopmentMode: PropTypes.bool,
|
|
184
161
|
};
|
|
185
162
|
|
|
186
163
|
export default PluginCard;
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
useTracking,
|
|
11
11
|
LoadingIndicatorPage,
|
|
12
12
|
useNotification,
|
|
13
|
+
useAppInfos,
|
|
13
14
|
} from '@strapi/helper-plugin';
|
|
14
15
|
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
|
15
16
|
import { Layout, HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
|
|
@@ -46,11 +47,12 @@ const MarketPlacePage = () => {
|
|
|
46
47
|
const trackUsageRef = useRef(trackUsage);
|
|
47
48
|
const toggleNotification = useNotification();
|
|
48
49
|
const [searchQuery, setSearchQuery] = useState('');
|
|
50
|
+
const { autoReload: isInDevelopmentMode } = useAppInfos();
|
|
49
51
|
|
|
50
52
|
useFocusWhenNavigate();
|
|
51
53
|
|
|
52
54
|
const marketplaceTitle = formatMessage({
|
|
53
|
-
id: '
|
|
55
|
+
id: 'global.marketplace',
|
|
54
56
|
defaultMessage: 'Marketplace',
|
|
55
57
|
});
|
|
56
58
|
|
|
@@ -101,6 +103,19 @@ const MarketPlacePage = () => {
|
|
|
101
103
|
trackUsageRef.current('didGoToMarketplace');
|
|
102
104
|
}, []);
|
|
103
105
|
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (!isInDevelopmentMode) {
|
|
108
|
+
toggleNotification({
|
|
109
|
+
type: 'info',
|
|
110
|
+
message: {
|
|
111
|
+
id: 'admin.pages.MarketPlacePage.production',
|
|
112
|
+
defaultMessage: 'Manage plugins from the development environment',
|
|
113
|
+
},
|
|
114
|
+
blockTransition: true,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}, [toggleNotification, isInDevelopmentMode]);
|
|
118
|
+
|
|
104
119
|
if (hasFailed) {
|
|
105
120
|
return (
|
|
106
121
|
<Layout>
|
|
@@ -137,7 +152,7 @@ const MarketPlacePage = () => {
|
|
|
137
152
|
/>
|
|
138
153
|
<HeaderLayout
|
|
139
154
|
title={formatMessage({
|
|
140
|
-
id: '
|
|
155
|
+
id: 'global.marketplace',
|
|
141
156
|
defaultMessage: 'Marketplace',
|
|
142
157
|
})}
|
|
143
158
|
subtitle={formatMessage({
|
|
@@ -198,6 +213,7 @@ const MarketPlacePage = () => {
|
|
|
198
213
|
plugin={plugin}
|
|
199
214
|
installedPluginNames={installedPluginNames}
|
|
200
215
|
useYarn={appInfoResponse.data.useYarn}
|
|
216
|
+
isInDevelopmentMode={isInDevelopmentMode}
|
|
201
217
|
/>
|
|
202
218
|
</GridItem>
|
|
203
219
|
))}
|
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
useNotification,
|
|
10
10
|
useOverlayBlocker,
|
|
11
11
|
auth,
|
|
12
|
+
useTracking,
|
|
12
13
|
} from '@strapi/helper-plugin';
|
|
13
14
|
import { useIntl } from 'react-intl';
|
|
14
15
|
import { Formik } from 'formik';
|
|
16
|
+
import upperFirst from 'lodash/upperFirst';
|
|
15
17
|
import { useQuery, useMutation, useQueryClient } from 'react-query';
|
|
16
18
|
import pick from 'lodash/pick';
|
|
17
|
-
import omit from 'lodash/omit';
|
|
18
19
|
import { Helmet } from 'react-helmet';
|
|
19
20
|
import { Main } from '@strapi/design-system/Main';
|
|
20
21
|
import { Typography } from '@strapi/design-system/Typography';
|
|
@@ -31,10 +32,15 @@ import Eye from '@strapi/icons/Eye';
|
|
|
31
32
|
import EyeStriked from '@strapi/icons/EyeStriked';
|
|
32
33
|
import Check from '@strapi/icons/Check';
|
|
33
34
|
import useLocalesProvider from '../../components/LocalesProvider/useLocalesProvider';
|
|
35
|
+
import { useThemeToggle } from '../../hooks';
|
|
34
36
|
import { fetchUser, putUser } from './utils/api';
|
|
35
37
|
import schema from './utils/schema';
|
|
36
38
|
import { getFullName } from '../../utils';
|
|
37
39
|
|
|
40
|
+
const DocumentationLink = styled.a`
|
|
41
|
+
color: ${({ theme }) => theme.colors.primary600};
|
|
42
|
+
`;
|
|
43
|
+
|
|
38
44
|
const PasswordInput = styled(TextInput)`
|
|
39
45
|
::-ms-reveal {
|
|
40
46
|
display: none;
|
|
@@ -59,9 +65,11 @@ const ProfilePage = () => {
|
|
|
59
65
|
const { setUserDisplayName } = useAppInfos();
|
|
60
66
|
const queryClient = useQueryClient();
|
|
61
67
|
const { formatMessage } = useIntl();
|
|
68
|
+
const { trackUsage } = useTracking();
|
|
62
69
|
const toggleNotification = useNotification();
|
|
63
70
|
const { lockApp, unlockApp } = useOverlayBlocker();
|
|
64
71
|
const { notifyStatus } = useNotifyAT();
|
|
72
|
+
const { currentTheme, themes: allApplicationThemes, onChangeTheme } = useThemeToggle();
|
|
65
73
|
useFocusWhenNavigate();
|
|
66
74
|
|
|
67
75
|
const { status, data } = useQuery('user', () => fetchUser(), {
|
|
@@ -83,14 +91,18 @@ const ProfilePage = () => {
|
|
|
83
91
|
|
|
84
92
|
const isLoading = status !== 'success';
|
|
85
93
|
|
|
86
|
-
const submitMutation = useMutation(body => putUser(
|
|
94
|
+
const submitMutation = useMutation(body => putUser(body), {
|
|
87
95
|
onSuccess: async data => {
|
|
88
96
|
await queryClient.invalidateQueries('user');
|
|
89
97
|
|
|
90
|
-
auth.setUserInfo(
|
|
98
|
+
auth.setUserInfo(
|
|
99
|
+
pick(data, ['email', 'firstname', 'lastname', 'username', 'preferedLanguage'])
|
|
100
|
+
);
|
|
91
101
|
const userDisplayName = data.username || getFullName(data.firstname, data.lastname);
|
|
92
102
|
setUserDisplayName(userDisplayName);
|
|
93
103
|
changeLocale(data.preferedLanguage);
|
|
104
|
+
onChangeTheme(data.currentTheme);
|
|
105
|
+
trackUsage('didChangeMode', { newMode: data.currentTheme });
|
|
94
106
|
|
|
95
107
|
toggleNotification({
|
|
96
108
|
type: 'success',
|
|
@@ -128,9 +140,16 @@ const ProfilePage = () => {
|
|
|
128
140
|
);
|
|
129
141
|
};
|
|
130
142
|
|
|
131
|
-
const fieldsToPick = [
|
|
143
|
+
const fieldsToPick = [
|
|
144
|
+
'currentTheme',
|
|
145
|
+
'email',
|
|
146
|
+
'firstname',
|
|
147
|
+
'lastname',
|
|
148
|
+
'username',
|
|
149
|
+
'preferedLanguage',
|
|
150
|
+
];
|
|
132
151
|
|
|
133
|
-
const initialData = pick(data, fieldsToPick);
|
|
152
|
+
const initialData = pick({ ...data, currentTheme }, fieldsToPick);
|
|
134
153
|
|
|
135
154
|
if (isLoading) {
|
|
136
155
|
return (
|
|
@@ -154,6 +173,10 @@ const ProfilePage = () => {
|
|
|
154
173
|
);
|
|
155
174
|
}
|
|
156
175
|
|
|
176
|
+
const themesToDisplay = Object.keys(allApplicationThemes).filter(
|
|
177
|
+
themeName => allApplicationThemes[themeName]
|
|
178
|
+
);
|
|
179
|
+
|
|
157
180
|
return (
|
|
158
181
|
<Main aria-busy={isSubmittingForm}>
|
|
159
182
|
<Helmet
|
|
@@ -176,7 +199,7 @@ const ProfilePage = () => {
|
|
|
176
199
|
title={data.username || getFullName(data.firstname, data.lastname)}
|
|
177
200
|
primaryAction={
|
|
178
201
|
<Button startIcon={<Check />} loading={isSubmitting} type="submit">
|
|
179
|
-
{formatMessage({ id: '
|
|
202
|
+
{formatMessage({ id: 'global.save', defaultMessage: 'Save' })}
|
|
180
203
|
</Button>
|
|
181
204
|
}
|
|
182
205
|
/>
|
|
@@ -195,7 +218,7 @@ const ProfilePage = () => {
|
|
|
195
218
|
<Stack spacing={4}>
|
|
196
219
|
<Typography variant="delta" as="h2">
|
|
197
220
|
{formatMessage({
|
|
198
|
-
id: '
|
|
221
|
+
id: 'global.profile',
|
|
199
222
|
defaultMessage: 'Profile',
|
|
200
223
|
})}
|
|
201
224
|
</Typography>
|
|
@@ -266,7 +289,7 @@ const ProfilePage = () => {
|
|
|
266
289
|
<Stack spacing={4}>
|
|
267
290
|
<Typography variant="delta" as="h2">
|
|
268
291
|
{formatMessage({
|
|
269
|
-
id: '
|
|
292
|
+
id: 'global.change-password',
|
|
270
293
|
defaultMessage: 'Change password',
|
|
271
294
|
})}
|
|
272
295
|
</Typography>
|
|
@@ -329,7 +352,7 @@ const ProfilePage = () => {
|
|
|
329
352
|
onChange={handleChange}
|
|
330
353
|
value={values.password || ''}
|
|
331
354
|
label={formatMessage({
|
|
332
|
-
id: '
|
|
355
|
+
id: 'global.password',
|
|
333
356
|
defaultMessage: 'Password',
|
|
334
357
|
})}
|
|
335
358
|
name="password"
|
|
@@ -424,20 +447,20 @@ const ProfilePage = () => {
|
|
|
424
447
|
id:
|
|
425
448
|
'Settings.profile.form.section.experience.interfaceLanguageHelp',
|
|
426
449
|
defaultMessage:
|
|
427
|
-
'
|
|
450
|
+
'Preference changes will apply only to you. More information is available {here}.',
|
|
428
451
|
},
|
|
429
452
|
{
|
|
430
|
-
|
|
431
|
-
<
|
|
453
|
+
here: (
|
|
454
|
+
<DocumentationLink
|
|
432
455
|
target="_blank"
|
|
433
456
|
rel="noopener noreferrer"
|
|
434
457
|
href="https://docs.strapi.io/developer-docs/latest/development/admin-customization.html#locales"
|
|
435
458
|
>
|
|
436
459
|
{formatMessage({
|
|
437
460
|
id: 'Settings.profile.form.section.experience.documentation',
|
|
438
|
-
defaultMessage: '
|
|
461
|
+
defaultMessage: 'here',
|
|
439
462
|
})}
|
|
440
|
-
</
|
|
463
|
+
</DocumentationLink>
|
|
441
464
|
),
|
|
442
465
|
}
|
|
443
466
|
)}
|
|
@@ -451,7 +474,7 @@ const ProfilePage = () => {
|
|
|
451
474
|
defaultMessage: 'Interface language',
|
|
452
475
|
})}
|
|
453
476
|
placeholder={formatMessage({
|
|
454
|
-
id: '
|
|
477
|
+
id: 'global.select',
|
|
455
478
|
defaultMessage: 'Select',
|
|
456
479
|
})}
|
|
457
480
|
hint={formatMessage({
|
|
@@ -487,6 +510,47 @@ const ProfilePage = () => {
|
|
|
487
510
|
})}
|
|
488
511
|
</Select>
|
|
489
512
|
</GridItem>
|
|
513
|
+
<GridItem s={12} col={6}>
|
|
514
|
+
<Select
|
|
515
|
+
label={formatMessage({
|
|
516
|
+
id: 'Settings.profile.form.section.experience.mode.label',
|
|
517
|
+
defaultMessage: 'Interface mode',
|
|
518
|
+
})}
|
|
519
|
+
placeholder={formatMessage({
|
|
520
|
+
id: 'components.Select.placeholder',
|
|
521
|
+
defaultMessage: 'Select',
|
|
522
|
+
})}
|
|
523
|
+
hint={formatMessage({
|
|
524
|
+
id: 'Settings.profile.form.section.experience.mode.hint',
|
|
525
|
+
defaultMessage: 'Displays your interface in the chosen mode.',
|
|
526
|
+
})}
|
|
527
|
+
value={values.currentTheme}
|
|
528
|
+
onChange={e => {
|
|
529
|
+
handleChange({
|
|
530
|
+
target: { name: 'currentTheme', value: e },
|
|
531
|
+
});
|
|
532
|
+
}}
|
|
533
|
+
>
|
|
534
|
+
{themesToDisplay.map(theme => {
|
|
535
|
+
const label = formatMessage(
|
|
536
|
+
{
|
|
537
|
+
id:
|
|
538
|
+
'Settings.profile.form.section.experience.mode.option-label',
|
|
539
|
+
defaultMessage: '{name} mode',
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: upperFirst(theme),
|
|
543
|
+
}
|
|
544
|
+
);
|
|
545
|
+
|
|
546
|
+
return (
|
|
547
|
+
<Option value={theme} key={theme}>
|
|
548
|
+
{label}
|
|
549
|
+
</Option>
|
|
550
|
+
);
|
|
551
|
+
})}
|
|
552
|
+
</Select>
|
|
553
|
+
</GridItem>
|
|
490
554
|
</Grid>
|
|
491
555
|
</Stack>
|
|
492
556
|
</Box>
|