@strapi/admin 4.1.10-beta.0 → 4.1.12

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.
Files changed (167) hide show
  1. package/admin/src/assets/images/homepage-logo.png +0 -0
  2. package/admin/src/components/AutoReloadOverlayBlockerProvider/Blocker.js +2 -6
  3. package/admin/src/components/GuidedTour/Homepage/index.js +1 -2
  4. package/admin/src/components/GuidedTour/Modal/components/Stepper.js +1 -2
  5. package/admin/src/components/LeftMenu/index.js +9 -9
  6. package/admin/src/components/Notifications/Notification/index.js +2 -2
  7. package/admin/src/components/Providers/index.js +4 -8
  8. package/admin/src/components/UnauthenticatedLogo/index.js +2 -4
  9. package/admin/src/components/UpgradePlanModal/index.js +6 -2
  10. package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/ComponentCard/index.js +1 -1
  11. package/admin/src/content-manager/components/SelectMany/ListItem.js +1 -2
  12. package/admin/src/content-manager/components/SelectWrapper/index.js +8 -7
  13. package/admin/src/content-manager/components/SelectWrapper/utils/getSelectStyles.js +1 -1
  14. package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +2 -2
  15. package/admin/src/content-manager/components/Wysiwyg/Editor.js +2 -0
  16. package/admin/src/content-manager/pages/App/LeftMenu/index.js +8 -7
  17. package/admin/src/content-manager/pages/EditSettingsView/components/ComponentFieldList.js +1 -1
  18. package/admin/src/content-manager/pages/EditSettingsView/components/LinkToCTB.js +1 -2
  19. package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -2
  20. package/admin/src/content-manager/pages/EditView/Header/index.js +3 -3
  21. package/admin/src/content-manager/pages/EditView/index.js +1 -4
  22. package/admin/src/content-manager/pages/ListSettingsView/index.js +1 -2
  23. package/admin/src/content-manager/pages/ListView/index.js +1 -1
  24. package/admin/src/content-manager/pages/NoContentType/index.js +1 -2
  25. package/admin/src/pages/App/index.js +2 -7
  26. package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +1 -2
  27. package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +1 -1
  28. package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +1 -2
  29. package/admin/src/pages/AuthPage/components/Oops/index.js +1 -2
  30. package/admin/src/pages/AuthPage/components/Register/index.js +12 -12
  31. package/admin/src/pages/AuthPage/components/ResetPassword/index.js +3 -4
  32. package/admin/src/pages/HomePage/ContentBlocks.js +15 -2
  33. package/admin/src/pages/HomePage/HomeHeader.js +2 -2
  34. package/admin/src/pages/HomePage/SocialLinks.js +4 -3
  35. package/admin/src/pages/InternalErrorPage/index.js +1 -2
  36. package/admin/src/pages/MarketplacePage/components/PageHeader/index.js +2 -1
  37. package/admin/src/pages/MarketplacePage/components/PluginCard/index.js +4 -3
  38. package/admin/src/pages/NotFoundPage/index.js +1 -2
  39. package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +5 -4
  40. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +1 -1
  41. package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/UpdateButton/index.js +1 -1
  42. package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/index.js +1 -1
  43. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +94 -150
  44. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +1 -1
  45. package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +1 -1
  46. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +1 -2
  47. package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +1 -1
  48. package/admin/src/translations/ca.json +699 -0
  49. package/admin/src/translations/en.json +0 -25
  50. package/admin/src/translations/languageNativeNames.js +1 -0
  51. package/admin/src/translations/ru.json +34 -0
  52. package/build/1856.6a94980b.chunk.js +172 -0
  53. package/build/2077.5456ccd1.chunk.js +194 -0
  54. package/build/2758.9475712b.chunk.js +162 -0
  55. package/build/2912.dd031292.chunk.js +253 -0
  56. package/build/4715.4588fdf5.chunk.js +385 -0
  57. package/build/4982.c57c5675.chunk.js +308 -0
  58. package/build/6706.7f57cb76.chunk.js +113 -0
  59. package/build/7589.577cf729.chunk.js +194 -0
  60. package/build/{5289.0341db2d.chunk.js → 7757.f6eb5e92.chunk.js} +89 -87
  61. package/build/7841.9e9cf739.chunk.js +253 -0
  62. package/build/8681.aec05472.chunk.js +163 -0
  63. package/build/9066.2847fdff.chunk.js +101 -0
  64. package/build/9115.abdf4e3b.chunk.js +1 -0
  65. package/build/9158.e48d88af.chunk.js +503 -0
  66. package/build/{9298.f97fcef0.chunk.js → 9298.cb3b6bc1.chunk.js} +93 -93
  67. package/build/9420.ba035f29.chunk.js +508 -0
  68. package/build/Admin-authenticatedApp.98b6e05b.chunk.js +80 -0
  69. package/build/Admin_homePage.8c00145e.chunk.js +71 -0
  70. package/build/Admin_marketplace.25133b64.chunk.js +11 -0
  71. package/build/Admin_settingsPage.e1dfbb1d.chunk.js +172 -0
  72. package/build/admin-edit-roles-page.e77a2acc.chunk.js +1 -0
  73. package/build/admin-edit-users.4c49fe98.chunk.js +11 -0
  74. package/build/api-tokens-create-page.618b3e40.chunk.js +1 -0
  75. package/build/api-tokens-edit-page.8d19dfe1.chunk.js +1 -0
  76. package/build/api-tokens-list-page.274e1c80.chunk.js +15 -0
  77. package/build/ca-json.0097e443.chunk.js +1 -0
  78. package/build/content-manager.04b93497.chunk.js +1204 -0
  79. package/build/content-type-builder.b3139cb1.chunk.js +141 -0
  80. package/build/email-settings-page.4ae595f6.chunk.js +103 -0
  81. package/build/en-json.3e1a222e.chunk.js +1 -0
  82. package/build/fb376b132d18bf4522ca.png +0 -0
  83. package/build/i18n-settings-page.bdac3c7b.chunk.js +101 -0
  84. package/build/index.html +1 -1
  85. package/build/main.baf8a3fd.js +8404 -0
  86. package/build/ru-json.28147733.chunk.js +1 -0
  87. package/build/runtime~main.7d21ca6f.js +2 -0
  88. package/build/upload-settings.cadfd452.chunk.js +101 -0
  89. package/build/upload-translation-ca-json.79159984.chunk.js +1 -0
  90. package/build/upload.fbc65439.chunk.js +105 -0
  91. package/build/users-advanced-settings-page.646b6f29.chunk.js +101 -0
  92. package/build/users-roles-settings-page.28bf6bdc.chunk.js +30 -0
  93. package/build/{webhook-edit-page.2e6727ab.chunk.js → webhook-edit-page.ca670f8d.chunk.js} +3 -3
  94. package/build/webhook-list-page.7057f1e8.chunk.js +133 -0
  95. package/ee/admin/pages/AuthPage/components/Providers/index.js +1 -1
  96. package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +1 -1
  97. package/ee/server/controllers/user.js +4 -0
  98. package/package.json +7 -7
  99. package/server/config/admin-actions.js +0 -14
  100. package/server/controllers/admin.js +1 -33
  101. package/server/controllers/user.js +4 -0
  102. package/server/routes/admin.js +0 -28
  103. package/server/services/index.js +0 -1
  104. package/server/services/permission/permissions-manager/sanitize.js +22 -0
  105. package/server/services/user.js +1 -1
  106. package/server/utils/index.d.ts +0 -2
  107. package/admin/src/components/ConfigurationsProvider/index.js +0 -51
  108. package/admin/src/components/ConfigurationsProvider/reducer.js +0 -28
  109. package/admin/src/content-manager/components/DynamicComponentCard/index.js +0 -43
  110. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/Form/index.js +0 -85
  111. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/Form/init.js +0 -13
  112. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/Form/reducer.js +0 -43
  113. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/index.js +0 -116
  114. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/reducer.js +0 -28
  115. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/stepper.js +0 -25
  116. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/AddLogoDialog.js +0 -67
  117. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/FromComputerForm.js +0 -176
  118. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/FromUrlForm.js +0 -82
  119. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/ImageCardAsset.js +0 -51
  120. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/PendingLogoDialog.js +0 -97
  121. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/index.js +0 -85
  122. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/reducer.js +0 -28
  123. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/api.js +0 -16
  124. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/constants.js +0 -3
  125. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/getFormData.js +0 -17
  126. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/parseFileMetadatas.js +0 -76
  127. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/prefixAllUrls.js +0 -17
  128. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/urlToFile.js +0 -21
  129. package/build/1856.521a99fd.chunk.js +0 -172
  130. package/build/2481.7ba28142.chunk.js +0 -184
  131. package/build/2758.927ecb6d.chunk.js +0 -162
  132. package/build/2912.79c2b3c8.chunk.js +0 -253
  133. package/build/2a9e9ef5c4c775bb7c7b.png +0 -0
  134. package/build/372.3720845e.chunk.js +0 -899
  135. package/build/4715.77e04177.chunk.js +0 -385
  136. package/build/497.fbd75558.chunk.js +0 -284
  137. package/build/4982.f53b78a4.chunk.js +0 -308
  138. package/build/6404.80bf5858.chunk.js +0 -506
  139. package/build/7197.959bbe97.chunk.js +0 -113
  140. package/build/7589.f3b26345.chunk.js +0 -194
  141. package/build/7841.f0e7d629.chunk.js +0 -253
  142. package/build/9115.318a6841.chunk.js +0 -1
  143. package/build/9853.d96fbc67.chunk.js +0 -356
  144. package/build/Admin-authenticatedApp.d8767873.chunk.js +0 -80
  145. package/build/Admin_homePage.50b6c129.chunk.js +0 -71
  146. package/build/Admin_marketplace.514ace37.chunk.js +0 -11
  147. package/build/Admin_settingsPage.0d94a598.chunk.js +0 -180
  148. package/build/admin-edit-roles-page.06f3d288.chunk.js +0 -1
  149. package/build/admin-edit-users.6a325cca.chunk.js +0 -11
  150. package/build/api-tokens-create-page.635e20c8.chunk.js +0 -1
  151. package/build/api-tokens-edit-page.db07253e.chunk.js +0 -1
  152. package/build/api-tokens-list-page.346c2149.chunk.js +0 -15
  153. package/build/content-manager.78e3f35c.chunk.js +0 -1204
  154. package/build/content-type-builder.0d8729ad.chunk.js +0 -141
  155. package/build/email-settings-page.fcc7e65d.chunk.js +0 -103
  156. package/build/en-json.ca572384.chunk.js +0 -1
  157. package/build/i18n-settings-page.477ffac7.chunk.js +0 -101
  158. package/build/main.06f66609.js +0 -7909
  159. package/build/ru-json.4560906c.chunk.js +0 -1
  160. package/build/runtime~main.dc1c7ef6.js +0 -2
  161. package/build/upload-settings.1456cd65.chunk.js +0 -101
  162. package/build/upload.d45af2c9.chunk.js +0 -105
  163. package/build/users-advanced-settings-page.5aa21b84.chunk.js +0 -101
  164. package/build/users-roles-settings-page.97d7092d.chunk.js +0 -30
  165. package/build/webhook-list-page.927257b5.chunk.js +0 -133
  166. package/server/services/project-settings.js +0 -173
  167. package/server/validation/project-settings.js +0 -39
@@ -1,19 +1,18 @@
1
1
  import React, { useState } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
  import PropTypes from 'prop-types';
4
- import { Form } from '@strapi/helper-plugin';
4
+ import styled from 'styled-components';
5
+ import { Formik } from 'formik';
6
+ import { Form, Link } from '@strapi/helper-plugin';
5
7
  import { Box } from '@strapi/design-system/Box';
6
8
  import { Stack } from '@strapi/design-system/Stack';
7
9
  import { Main } from '@strapi/design-system/Main';
8
10
  import { Flex } from '@strapi/design-system/Flex';
9
- import { Link } from '@strapi/design-system/Link';
10
11
  import { Button } from '@strapi/design-system/Button';
11
12
  import { TextInput } from '@strapi/design-system/TextInput';
12
13
  import { Typography } from '@strapi/design-system/Typography';
13
14
  import EyeStriked from '@strapi/icons/EyeStriked';
14
15
  import Eye from '@strapi/icons/Eye';
15
- import styled from 'styled-components';
16
- import { Formik } from 'formik';
17
16
  import UnauthenticatedLayout, {
18
17
  Column,
19
18
  LayoutContent,
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { useIntl } from 'react-intl';
4
+ import { ContentBox, useTracking } from '@strapi/helper-plugin';
4
5
  import { Stack } from '@strapi/design-system/Stack';
5
6
  import InformationSquare from '@strapi/icons/InformationSquare';
6
7
  import CodeSquare from '@strapi/icons/CodeSquare';
7
8
  import PlaySquare from '@strapi/icons/PlaySquare';
8
9
  import FeatherSquare from '@strapi/icons/FeatherSquare';
9
- import { ContentBox } from '@strapi/helper-plugin';
10
10
 
11
11
  const BlockLink = styled.a`
12
12
  text-decoration: none;
@@ -14,6 +14,11 @@ const BlockLink = styled.a`
14
14
 
15
15
  const ContentBlocks = () => {
16
16
  const { formatMessage } = useIntl();
17
+ const { trackUsage } = useTracking();
18
+
19
+ const handleClick = eventName => {
20
+ trackUsage(eventName);
21
+ };
17
22
 
18
23
  return (
19
24
  <Stack spacing={5}>
@@ -21,6 +26,7 @@ const ContentBlocks = () => {
21
26
  href="https://strapi.io/resource-center"
22
27
  target="_blank"
23
28
  rel="noopener noreferrer nofollow"
29
+ onClick={() => handleClick('didClickonReadTheDocumentationSection')}
24
30
  >
25
31
  <ContentBox
26
32
  title={formatMessage({
@@ -39,6 +45,7 @@ const ContentBlocks = () => {
39
45
  href="https://strapi.io/starters"
40
46
  target="_blank"
41
47
  rel="noopener noreferrer nofollow"
48
+ onClick={() => handleClick('didClickonCodeExampleSection')}
42
49
  >
43
50
  <ContentBox
44
51
  title={formatMessage({
@@ -57,6 +64,7 @@ const ContentBlocks = () => {
57
64
  href="https://strapi.io/blog/categories/tutorials"
58
65
  target="_blank"
59
66
  rel="noopener noreferrer nofollow"
67
+ onClick={() => handleClick('didClickonTutorialSection')}
60
68
  >
61
69
  <ContentBox
62
70
  title={formatMessage({
@@ -71,7 +79,12 @@ const ContentBlocks = () => {
71
79
  iconBackground="secondary100"
72
80
  />
73
81
  </BlockLink>
74
- <BlockLink href="https://strapi.io/blog" target="_blank" rel="noopener noreferrer nofollow">
82
+ <BlockLink
83
+ href="https://strapi.io/blog"
84
+ target="_blank"
85
+ rel="noopener noreferrer nofollow"
86
+ onClick={() => handleClick('didClickonBlogSection')}
87
+ >
75
88
  <ContentBox
76
89
  title={formatMessage({
77
90
  id: 'app.components.BlockLink.blog',
@@ -3,7 +3,7 @@ import styled from 'styled-components';
3
3
  import PropTypes from 'prop-types';
4
4
  import { useIntl } from 'react-intl';
5
5
  import { Typography } from '@strapi/design-system/Typography';
6
- import { Link } from '@strapi/design-system/Link';
6
+ import { Link } from '@strapi/design-system/v2/Link';
7
7
  import { Stack } from '@strapi/design-system/Stack';
8
8
  import { Box } from '@strapi/design-system/Box';
9
9
  import { Button } from '@strapi/design-system/Button';
@@ -49,7 +49,7 @@ const HomeHeader = ({ hasCreatedContentType, onCreateCT }) => {
49
49
  })}
50
50
  </WordWrap>
51
51
  {hasCreatedContentType ? (
52
- <Link href="https://strapi.io/blog">
52
+ <Link isExternal href="https://strapi.io/blog">
53
53
  {formatMessage({
54
54
  id: 'app.components.HomePage.button.blog',
55
55
  defaultMessage: 'See more on the blog',
@@ -10,8 +10,8 @@ import { Typography } from '@strapi/design-system/Typography';
10
10
  import { Box } from '@strapi/design-system/Box';
11
11
  import { Stack } from '@strapi/design-system/Stack';
12
12
  import { Grid, GridItem } from '@strapi/design-system/Grid';
13
- import { LinkButton } from '@strapi/design-system/LinkButton';
14
- import { Link } from '@strapi/design-system/Link';
13
+ import { LinkButton } from '@strapi/design-system/v2/LinkButton';
14
+ import { Link } from '@strapi/design-system/v2/Link';
15
15
  import ExternalLink from '@strapi/icons/ExternalLink';
16
16
  import Github from '@strapi/icons/Github';
17
17
  import Discord from '@strapi/icons/Discord';
@@ -167,7 +167,7 @@ const SocialLinks = () => {
167
167
  })}
168
168
  </Typography>
169
169
  </Stack>
170
- <Link href="https://feedback.strapi.io/" endIcon={<ExternalLink />}>
170
+ <Link href="https://feedback.strapi.io/" isExternal endIcon={<ExternalLink />}>
171
171
  {formatMessage({
172
172
  id: 'app.components.HomePage.roadmap',
173
173
  defaultMessage: 'See our road map',
@@ -184,6 +184,7 @@ const SocialLinks = () => {
184
184
  startIcon={socialLink.icon}
185
185
  variant="tertiary"
186
186
  href={socialLink.link}
187
+ isExternal
187
188
  >
188
189
  {socialLink.name}
189
190
  </LinkCustom>
@@ -5,9 +5,8 @@
5
5
  *
6
6
  */
7
7
  import React from 'react';
8
- import { useFocusWhenNavigate } from '@strapi/helper-plugin';
8
+ import { useFocusWhenNavigate, LinkButton } from '@strapi/helper-plugin';
9
9
  import { Main } from '@strapi/design-system/Main';
10
- import { LinkButton } from '@strapi/design-system/LinkButton';
11
10
  import { ContentLayout, HeaderLayout } from '@strapi/design-system/Layout';
12
11
  import { EmptyStateLayout } from '@strapi/design-system/EmptyStateLayout';
13
12
  import EmptyPictures from '@strapi/icons/EmptyPictures';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { useIntl } from 'react-intl';
4
4
  import { HeaderLayout } from '@strapi/design-system/Layout';
5
- import { LinkButton } from '@strapi/design-system/LinkButton';
5
+ import { LinkButton } from '@strapi/design-system/v2/LinkButton';
6
6
  import Upload from '@strapi/icons/Upload';
7
7
  import { useTracking } from '@strapi/helper-plugin';
8
8
 
@@ -27,6 +27,7 @@ const PageHeader = ({ isOnline }) => {
27
27
  variant="tertiary"
28
28
  href="https://market.strapi.io/submit-plugin"
29
29
  onClick={() => trackUsage('didSubmitPlugin')}
30
+ isExternal
30
31
  >
31
32
  {formatMessage({
32
33
  id: 'admin.pages.MarketPlacePage.submit.plugin.link',
@@ -5,7 +5,7 @@ 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 { LinkButton } from '@strapi/design-system/LinkButton';
8
+ import { LinkButton } from '@strapi/design-system/v2/LinkButton';
9
9
  import { Flex } from '@strapi/design-system/Flex';
10
10
  import { Icon } from '@strapi/design-system/Icon';
11
11
  import { Tooltip } from '@strapi/design-system/Tooltip';
@@ -46,9 +46,9 @@ const PluginCard = ({ plugin, installedPluginNames, useYarn, isInDevelopmentMode
46
46
  direction="column"
47
47
  justifyContent="space-between"
48
48
  paddingTop={4}
49
- paddingRight={6}
49
+ paddingRight={4}
50
50
  paddingBottom={4}
51
- paddingLeft={6}
51
+ paddingLeft={4}
52
52
  hasRadius
53
53
  background="neutral0"
54
54
  shadow="tableShadow"
@@ -108,6 +108,7 @@ const PluginCard = ({ plugin, installedPluginNames, useYarn, isInDevelopmentMode
108
108
  <LinkButton
109
109
  size="S"
110
110
  href={`https://market.strapi.io/plugins/${attributes.slug}`}
111
+ isExternal
111
112
  endIcon={<ExternalLink />}
112
113
  aria-label={formatMessage(
113
114
  {
@@ -5,9 +5,8 @@
5
5
  *
6
6
  */
7
7
  import React from 'react';
8
- import { useFocusWhenNavigate } from '@strapi/helper-plugin';
8
+ import { useFocusWhenNavigate, LinkButton } from '@strapi/helper-plugin';
9
9
  import { Main } from '@strapi/design-system/Main';
10
- import { LinkButton } from '@strapi/design-system/LinkButton';
11
10
  import { ContentLayout, HeaderLayout } from '@strapi/design-system/Layout';
12
11
  import { EmptyStateLayout } from '@strapi/design-system/EmptyStateLayout';
13
12
  import EmptyPictures from '@strapi/icons/EmptyPictures';
@@ -1,13 +1,14 @@
1
1
  import React from 'react';
2
+ import { NavLink } from 'react-router-dom';
3
+ import { useIntl } from 'react-intl';
4
+ import PropTypes from 'prop-types';
2
5
  import {
3
6
  SubNav,
4
7
  SubNavHeader,
5
8
  SubNavSection,
6
9
  SubNavSections,
7
10
  SubNavLink,
8
- } from '@strapi/design-system/SubNav';
9
- import { useIntl } from 'react-intl';
10
- import PropTypes from 'prop-types';
11
+ } from '@strapi/design-system/v2/SubNav';
11
12
  import { getSectionsToDisplay } from '../../utils';
12
13
 
13
14
  const SettingsNav = ({ menu }) => {
@@ -41,7 +42,7 @@ const SettingsNav = ({ menu }) => {
41
42
  {sections.map(section => (
42
43
  <SubNavSection key={section.id} label={formatMessage(section.intlLabel)}>
43
44
  {section.links.map(link => (
44
- <SubNavLink withBullet={link.hasNotification} to={link.to} key={link.id}>
45
+ <SubNavLink as={NavLink} withBullet={link.hasNotification} to={link.to} key={link.id}>
45
46
  {formatMessage(link.intlLabel)}
46
47
  </SubNavLink>
47
48
  ))}
@@ -8,13 +8,13 @@ import {
8
8
  useNotification,
9
9
  useTracking,
10
10
  useGuidedTour,
11
+ Link,
11
12
  } from '@strapi/helper-plugin';
12
13
  import { HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
13
14
  import { Main } from '@strapi/design-system/Main';
14
15
  import { Button } from '@strapi/design-system/Button';
15
16
  import Check from '@strapi/icons/Check';
16
17
  import ArrowLeft from '@strapi/icons/ArrowLeft';
17
- import { Link } from '@strapi/design-system/Link';
18
18
  import { Formik } from 'formik';
19
19
  import { Stack } from '@strapi/design-system/Stack';
20
20
  import { Box } from '@strapi/design-system/Box';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import Pencil from '@strapi/icons/Pencil';
3
3
  import { useIntl } from 'react-intl';
4
4
  import PropTypes from 'prop-types';
5
- import { Link } from '@strapi/design-system/Link';
5
+ import { Link } from '@strapi/helper-plugin';
6
6
  import { useHistory } from 'react-router-dom';
7
7
  import styled from 'styled-components';
8
8
 
@@ -10,11 +10,11 @@ import {
10
10
  DynamicTable,
11
11
  useTracking,
12
12
  useGuidedTour,
13
+ LinkButton,
13
14
  } from '@strapi/helper-plugin';
14
15
  import { HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
15
16
  import { Main } from '@strapi/design-system/Main';
16
17
  import { Button } from '@strapi/design-system/Button';
17
- import { LinkButton } from '@strapi/design-system/LinkButton';
18
18
  import Plus from '@strapi/icons/Plus';
19
19
  import { useQuery, useMutation, useQueryClient } from 'react-query';
20
20
  import { useHistory } from 'react-router-dom';
@@ -1,76 +1,26 @@
1
- import React, { useRef } from 'react';
2
- import { useQuery, useMutation, useQueryClient } from 'react-query';
1
+ import React from 'react';
3
2
  import { useIntl } from 'react-intl';
4
- import {
5
- useAppInfos,
6
- SettingsPageTitle,
7
- useFocusWhenNavigate,
8
- CheckPermissions,
9
- useNotification,
10
- useTracking,
11
- } from '@strapi/helper-plugin';
3
+ import { useAppInfos, SettingsPageTitle, useFocusWhenNavigate } from '@strapi/helper-plugin';
12
4
  import { HeaderLayout, Layout, ContentLayout } from '@strapi/design-system/Layout';
13
5
  import { Main } from '@strapi/design-system/Main';
14
6
  import { Box } from '@strapi/design-system/Box';
15
7
  import { Grid, GridItem } from '@strapi/design-system/Grid';
16
8
  import { Typography } from '@strapi/design-system/Typography';
9
+
17
10
  import { Stack } from '@strapi/design-system/Stack';
18
- import { Link } from '@strapi/design-system/Link';
19
- import { Button } from '@strapi/design-system/Button';
11
+ import { Link } from '@strapi/design-system/v2/Link';
20
12
  import ExternalLink from '@strapi/icons/ExternalLink';
21
- import Check from '@strapi/icons/Check';
22
- import { useConfigurations } from '../../../../hooks';
23
- import Form from './components/Form';
24
- import { fetchProjectSettings, postProjectSettings } from './utils/api';
25
- import getFormData from './utils/getFormData';
26
-
27
- const permissions = [{ action: 'admin::project-settings.update', subject: null }];
28
13
 
29
14
  const ApplicationInfosPage = () => {
30
- const inputsRef = useRef();
31
- const toggleNotification = useNotification();
32
- const { trackUsage } = useTracking();
33
15
  const { formatMessage } = useIntl();
34
- const queryClient = useQueryClient();
35
16
  useFocusWhenNavigate();
36
17
  const appInfos = useAppInfos();
37
18
  const { shouldUpdateStrapi, latestStrapiReleaseTag, strapiVersion } = appInfos;
38
- const { updateProjectSettings } = useConfigurations();
39
-
40
- const { data } = useQuery('project-settings', fetchProjectSettings);
41
19
 
42
20
  const currentPlan = appInfos.communityEdition
43
21
  ? 'app.components.UpgradePlanModal.text-ce'
44
22
  : 'app.components.UpgradePlanModal.text-ee';
45
23
 
46
- const submitMutation = useMutation(body => postProjectSettings(body), {
47
- onSuccess: async ({ menuLogo }) => {
48
- await queryClient.invalidateQueries('project-settings', { refetchActive: true });
49
- updateProjectSettings({ menuLogo: menuLogo?.url });
50
- },
51
- });
52
-
53
- const handleSubmit = () => {
54
- const inputValues = inputsRef.current.getValues();
55
- const formData = getFormData(inputValues);
56
-
57
- submitMutation.mutate(formData, {
58
- onSuccess: () => {
59
- const { menuLogo } = inputValues;
60
-
61
- if (menuLogo.rawFile) {
62
- trackUsage('didChangeLogo');
63
- }
64
- },
65
- onError: () => {
66
- toggleNotification({
67
- type: 'warning',
68
- message: { id: 'notification.error', defaultMessage: 'An error occurred' },
69
- });
70
- },
71
- });
72
- };
73
-
74
24
  return (
75
25
  <Layout>
76
26
  <SettingsPageTitle name="Application" />
@@ -81,113 +31,107 @@ const ApplicationInfosPage = () => {
81
31
  id: 'Settings.application.description',
82
32
  defaultMessage: 'Administration panel’s global information',
83
33
  })}
84
- primaryAction={
85
- <Button onClick={handleSubmit} startIcon={<Check />}>
86
- {formatMessage({ id: 'global.save', defaultMessage: 'Save' })}
87
- </Button>
88
- }
89
34
  />
90
35
  <ContentLayout>
91
- <Stack spacing={6}>
92
- <Box
93
- hasRadius
94
- background="neutral0"
95
- shadow="tableShadow"
96
- paddingTop={6}
97
- paddingBottom={6}
98
- paddingRight={7}
99
- paddingLeft={7}
100
- >
101
- <Stack spacing={5}>
102
- <Typography variant="delta" as="h3">
103
- {formatMessage({
104
- id: 'global.details',
105
- defaultMessage: 'Details',
106
- })}
107
- </Typography>
36
+ <Box
37
+ hasRadius
38
+ background="neutral0"
39
+ shadow="tableShadow"
40
+ paddingTop={7}
41
+ paddingBottom={7}
42
+ paddingRight={6}
43
+ paddingLeft={6}
44
+ >
45
+ <Stack spacing={5}>
46
+ <Typography variant="delta" as="h3">
47
+ {formatMessage({
48
+ id: 'global.details',
49
+ defaultMessage: 'Details',
50
+ })}
51
+ </Typography>
108
52
 
109
- <Grid paddingTop={1}>
110
- <GridItem col={6} s={12}>
111
- <Typography variant="sigma" textColor="neutral600">
112
- {formatMessage({
113
- id: 'Settings.application.strapiVersion',
114
- defaultMessage: 'strapi version',
115
- })}
116
- </Typography>
117
- <Typography as="p">v{strapiVersion}</Typography>
53
+ <Grid paddingTop={1}>
54
+ <GridItem col={6} s={12}>
55
+ <Typography variant="sigma" textColor="neutral600">
56
+ {formatMessage({
57
+ id: 'Settings.application.strapiVersion',
58
+ defaultMessage: 'strapi version',
59
+ })}
60
+ </Typography>
61
+ <Typography as="p">v{strapiVersion}</Typography>
62
+ <Link
63
+ href={
64
+ appInfos.communityEdition
65
+ ? 'https://discord.strapi.io'
66
+ : 'https://support.strapi.io/support/home'
67
+ }
68
+ isExternal
69
+ endIcon={<ExternalLink />}
70
+ >
71
+ {formatMessage({
72
+ id: 'Settings.application.get-help',
73
+ defaultMessage: 'Get help',
74
+ })}
75
+ </Link>
76
+ </GridItem>
77
+ <GridItem col={6} s={12}>
78
+ <Typography variant="sigma" textColor="neutral600">
79
+ {formatMessage({
80
+ id: 'Settings.application.edition-title',
81
+ defaultMessage: 'current plan',
82
+ })}
83
+ </Typography>
84
+ <Typography as="p">
85
+ {formatMessage({
86
+ id: currentPlan,
87
+ defaultMessage: `${
88
+ appInfos.communityEdition ? 'Community Edition' : 'Enterprise Edition'
89
+ }`,
90
+ })}
91
+ </Typography>
92
+ </GridItem>
93
+ </Grid>
94
+
95
+ <Grid paddingTop={1}>
96
+ <GridItem col={6} s={12}>
97
+ {shouldUpdateStrapi && (
118
98
  <Link
119
- href={
120
- appInfos.communityEdition
121
- ? 'https://discord.strapi.io'
122
- : 'https://support.strapi.io/support/home'
123
- }
99
+ href={`https://github.com/strapi/strapi/releases/tag/${latestStrapiReleaseTag}`}
100
+ isExternal
124
101
  endIcon={<ExternalLink />}
125
102
  >
126
103
  {formatMessage({
127
- id: 'Settings.application.get-help',
128
- defaultMessage: 'Get help',
129
- })}
130
- </Link>
131
- </GridItem>
132
- <GridItem col={6} s={12}>
133
- <Typography variant="sigma" textColor="neutral600">
134
- {formatMessage({
135
- id: 'Settings.application.edition-title',
136
- defaultMessage: 'current plan',
137
- })}
138
- </Typography>
139
- <Typography as="p">
140
- {formatMessage({
141
- id: currentPlan,
142
- defaultMessage: `${
143
- appInfos.communityEdition ? 'Community Edition' : 'Enterprise Edition'
144
- }`,
145
- })}
146
- </Typography>
147
- </GridItem>
148
- </Grid>
149
-
150
- <Grid paddingTop={1}>
151
- <GridItem col={6} s={12}>
152
- {shouldUpdateStrapi && (
153
- <Link
154
- href={`https://github.com/strapi/strapi/releases/tag/${latestStrapiReleaseTag}`}
155
- endIcon={<ExternalLink />}
156
- >
157
- {formatMessage({
158
- id: 'Settings.application.link-upgrade',
159
- defaultMessage: 'Upgrade your admin panel',
160
- })}
161
- </Link>
162
- )}
163
- </GridItem>
164
- <GridItem col={6} s={12}>
165
- <Link href="https://strapi.io/pricing-self-hosted" endIcon={<ExternalLink />}>
166
- {formatMessage({
167
- id: 'Settings.application.link-pricing',
168
- defaultMessage: 'See all pricing plans',
104
+ id: 'Settings.application.link-upgrade',
105
+ defaultMessage: 'Upgrade your admin panel',
169
106
  })}
170
107
  </Link>
171
- </GridItem>
172
- </Grid>
173
-
174
- <Box paddingTop={1}>
175
- <Typography variant="sigma" textColor="neutral600">
108
+ )}
109
+ </GridItem>
110
+ <GridItem col={6} s={12}>
111
+ <Link
112
+ href="https://strapi.io/pricing-self-hosted"
113
+ isExternal
114
+ endIcon={<ExternalLink />}
115
+ >
176
116
  {formatMessage({
177
- id: 'Settings.application.node-version',
178
- defaultMessage: 'node version',
117
+ id: 'Settings.application.link-pricing',
118
+ defaultMessage: 'See all pricing plans',
179
119
  })}
180
- </Typography>
181
- <Typography as="p">{appInfos.nodeVersion}</Typography>
182
- </Box>
183
- </Stack>
184
- </Box>
185
- {data && (
186
- <CheckPermissions permissions={permissions}>
187
- <Form ref={inputsRef} projectSettingsStored={data} />
188
- </CheckPermissions>
189
- )}
190
- </Stack>
120
+ </Link>
121
+ </GridItem>
122
+ </Grid>
123
+
124
+ <Box paddingTop={1}>
125
+ <Typography variant="sigma" textColor="neutral600">
126
+ {formatMessage({
127
+ id: 'Settings.application.node-version',
128
+ defaultMessage: 'node version',
129
+ })}
130
+ </Typography>
131
+ <Typography as="p">{appInfos.nodeVersion}</Typography>
132
+ </Box>
133
+ </Stack>
134
+ </Box>
191
135
  </ContentLayout>
192
136
  </Main>
193
137
  </Layout>
@@ -6,6 +6,7 @@ import {
6
6
  useTracking,
7
7
  LoadingIndicatorPage,
8
8
  SettingsPageTitle,
9
+ Link,
9
10
  } from '@strapi/helper-plugin';
10
11
  import { Box } from '@strapi/design-system/Box';
11
12
  import { Button } from '@strapi/design-system/Button';
@@ -13,7 +14,6 @@ import { ContentLayout, HeaderLayout } from '@strapi/design-system/Layout';
13
14
  import { Main } from '@strapi/design-system/Main';
14
15
  import { Stack } from '@strapi/design-system/Stack';
15
16
  import { Formik } from 'formik';
16
- import { Link } from '@strapi/design-system/Link';
17
17
  import ArrowLeft from '@strapi/icons/ArrowLeft';
18
18
  import get from 'lodash/get';
19
19
  import { useIntl } from 'react-intl';
@@ -15,6 +15,7 @@ import {
15
15
  useNotification,
16
16
  useOverlayBlocker,
17
17
  LoadingIndicatorPage,
18
+ Link,
18
19
  } from '@strapi/helper-plugin';
19
20
  import { useQuery } from 'react-query';
20
21
  import { Formik } from 'formik';
@@ -22,7 +23,6 @@ import { Box } from '@strapi/design-system/Box';
22
23
  import { Button } from '@strapi/design-system/Button';
23
24
  import { Grid, GridItem } from '@strapi/design-system/Grid';
24
25
  import { HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
25
- import { Link } from '@strapi/design-system/Link';
26
26
  import { Typography } from '@strapi/design-system/Typography';
27
27
  import { Main } from '@strapi/design-system/Main';
28
28
  import { Stack } from '@strapi/design-system/Stack';
@@ -1,13 +1,12 @@
1
1
  import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { Form } from '@strapi/helper-plugin';
3
+ import { Form, Link } from '@strapi/helper-plugin';
4
4
  import ArrowLeft from '@strapi/icons/ArrowLeft';
5
5
  import Check from '@strapi/icons/Check';
6
6
  import Publish from '@strapi/icons/Play';
7
7
  import { ContentLayout, HeaderLayout } from '@strapi/design-system/Layout';
8
8
  import { Box } from '@strapi/design-system/Box';
9
9
  import { Button } from '@strapi/design-system/Button';
10
- import { Link } from '@strapi/design-system/Link';
11
10
  import { Stack } from '@strapi/design-system/Stack';
12
11
  import { TextInput } from '@strapi/design-system/TextInput';
13
12
  import { Grid, GridItem } from '@strapi/design-system/Grid';
@@ -17,6 +17,7 @@ import {
17
17
  ConfirmDialog,
18
18
  onRowClick,
19
19
  stopPropagation,
20
+ LinkButton,
20
21
  } from '@strapi/helper-plugin';
21
22
  import { HeaderLayout, Layout, ContentLayout, ActionLayout } from '@strapi/design-system/Layout';
22
23
  import { EmptyStateLayout } from '@strapi/design-system/EmptyStateLayout';
@@ -30,7 +31,6 @@ import { Button } from '@strapi/design-system/Button';
30
31
  import { VisuallyHidden } from '@strapi/design-system/VisuallyHidden';
31
32
  import { Switch } from '@strapi/design-system/Switch';
32
33
  import { Main } from '@strapi/design-system/Main';
33
- import { LinkButton } from '@strapi/design-system/LinkButton';
34
34
  import { useNotifyAT } from '@strapi/design-system/LiveRegions';
35
35
  import { Box } from '@strapi/design-system/Box';
36
36
  import Plus from '@strapi/icons/Plus';