@strapi/admin 4.6.0-beta.0 → 4.6.0-beta.1

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 (181) hide show
  1. package/admin/src/components/AuthenticatedApp/index.js +13 -2
  2. package/admin/src/components/GlobalStyle/index.js +0 -5
  3. package/admin/src/content-manager/components/ComponentIcon/ComponentIcon.js +49 -0
  4. package/admin/src/content-manager/components/ComponentIcon/index.js +1 -0
  5. package/admin/src/content-manager/components/DragLayer/ComponentDragPreview.js +2 -16
  6. package/admin/src/content-manager/components/DragLayer/RelationDragPreview.js +3 -3
  7. package/admin/src/content-manager/components/DragLayer/index.js +1 -1
  8. package/admin/src/content-manager/components/DynamicZone/components/ComponentCard.js +17 -31
  9. package/admin/src/content-manager/components/DynamicZone/components/ComponentCategory.js +2 -2
  10. package/admin/src/content-manager/components/DynamicZone/components/DynamicComponent.js +0 -2
  11. package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +19 -2
  12. package/admin/src/content-manager/components/InputJSON/FieldWrapper.js +10 -2
  13. package/admin/src/content-manager/components/InputJSON/Label.js +2 -18
  14. package/admin/src/content-manager/components/InputJSON/index.js +7 -3
  15. package/admin/src/content-manager/components/RelationInput/RelationInput.js +8 -17
  16. package/admin/src/content-manager/components/RelationInput/components/RelationItem.js +2 -0
  17. package/admin/src/content-manager/components/RelationInput/index.js +1 -0
  18. package/admin/src/content-manager/components/RepeatableComponent/index.js +1 -3
  19. package/admin/src/content-manager/hooks/useDragAndDrop.js +25 -11
  20. package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +18 -38
  21. package/admin/src/pages/Admin/Onboarding/index.js +42 -44
  22. package/admin/src/pages/App/index.js +20 -13
  23. package/admin/src/pages/AuthPage/components/Register/index.js +1 -1
  24. package/admin/src/pages/AuthPage/components/ResetPassword/index.js +1 -1
  25. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -3
  26. package/admin/src/translations/en.json +2 -1
  27. package/admin/src/translations/sk.json +274 -52
  28. package/admin/src/translations/tr.json +485 -5
  29. package/admin/src/utils/index.js +1 -0
  30. package/admin/src/utils/uniqueAdminHash.js +22 -0
  31. package/build/2235.06c13219.chunk.js +106 -0
  32. package/build/2598.962797b2.chunk.js +159 -0
  33. package/build/4318.0bbd3f4b.chunk.js +30 -0
  34. package/build/4958.7c118f5e.chunk.js +276 -0
  35. package/build/5052.712419ea.chunk.js +65 -0
  36. package/build/7295.04ac49dc.chunk.js +114 -0
  37. package/build/805.ddcead70.chunk.js +138 -0
  38. package/build/874.bde3ea04.chunk.js +104 -0
  39. package/build/9159.ac968e72.chunk.js +169 -0
  40. package/build/9707.77e475ee.chunk.js +101 -0
  41. package/build/Admin-authenticatedApp.9dd415b8.chunk.js +72 -0
  42. package/build/Admin_pluginsPage.67728975.chunk.js +6 -0
  43. package/build/{Admin_profilePage.c07bdf08.chunk.js → Admin_profilePage.60ab80bb.chunk.js} +1 -1
  44. package/build/{Admin_settingsPage.50a8765b.chunk.js → Admin_settingsPage.9ce40fed.chunk.js} +3 -3
  45. package/build/Upload_ConfigureTheView.7cb2a3fd.chunk.js +1 -0
  46. package/build/admin-app.d8fc7c4d.chunk.js +112 -0
  47. package/build/admin-edit-users.5547b126.chunk.js +10 -0
  48. package/build/{admin-users.a2707644.chunk.js → admin-users.4b6b47f8.chunk.js} +1 -1
  49. package/build/{api-tokens-list-page.700e575f.chunk.js → api-tokens-list-page.50519ed7.chunk.js} +1 -1
  50. package/build/content-manager.f2214e32.chunk.js +1166 -0
  51. package/build/content-type-builder-list-view.4aea46fa.chunk.js +198 -0
  52. package/build/content-type-builder-translation-de-json.a52482c7.chunk.js +1 -0
  53. package/build/content-type-builder-translation-dk-json.a8616510.chunk.js +1 -0
  54. package/build/content-type-builder-translation-en-json.1d9a3c14.chunk.js +1 -0
  55. package/build/content-type-builder-translation-es-json.c3ea46fb.chunk.js +1 -0
  56. package/build/content-type-builder-translation-ko-json.3fb7ddc8.chunk.js +1 -0
  57. package/build/content-type-builder-translation-pl-json.9b2993b2.chunk.js +1 -0
  58. package/build/content-type-builder-translation-pt-BR-json.6d255441.chunk.js +1 -0
  59. package/build/content-type-builder-translation-sv-json.c608b9ca.chunk.js +1 -0
  60. package/build/content-type-builder-translation-tr-json.949e22eb.chunk.js +1 -0
  61. package/build/content-type-builder-translation-zh-json.b79513e4.chunk.js +1 -0
  62. package/build/content-type-builder.8a9a77f9.chunk.js +127 -0
  63. package/build/email-settings-page.c6e62f6b.chunk.js +15 -0
  64. package/build/email-translation-tr-json.8aa034bb.chunk.js +1 -0
  65. package/build/en-json.1abdade9.chunk.js +1 -0
  66. package/build/{i18n-settings-page.195d42fe.chunk.js → i18n-settings-page.ee572037.chunk.js} +1 -1
  67. package/build/i18n-translation-tr-json.34ca9d61.chunk.js +1 -0
  68. package/build/index.html +1 -1
  69. package/build/main.91f6e21e.js +4099 -0
  70. package/build/runtime~main.447b0382.js +2 -0
  71. package/build/sk-json.2af48064.chunk.js +1 -0
  72. package/build/sso-settings-page.91924df1.chunk.js +41 -0
  73. package/build/tr-json.eac8bd79.chunk.js +1 -0
  74. package/build/upload-settings.326cd9fd.chunk.js +89 -0
  75. package/build/upload-translation-en-json.32cf9aff.chunk.js +1 -0
  76. package/build/upload-translation-sk-json.fe86c53b.chunk.js +1 -0
  77. package/build/upload-translation-tr-json.b173223a.chunk.js +1 -0
  78. package/build/upload.2977cb13.chunk.js +38 -0
  79. package/build/users-email-settings-page.18d4a475.chunk.js +28 -0
  80. package/build/{users-permissions-translation-dk-json.fe39c74b.chunk.js → users-permissions-translation-dk-json.bad0b786.chunk.js} +1 -1
  81. package/build/{users-permissions-translation-en-json.765abf48.chunk.js → users-permissions-translation-en-json.aeab388a.chunk.js} +1 -1
  82. package/build/{users-permissions-translation-es-json.1bb9cde2.chunk.js → users-permissions-translation-es-json.152a923f.chunk.js} +1 -1
  83. package/build/{users-permissions-translation-ko-json.3be77775.chunk.js → users-permissions-translation-ko-json.6bd0ae22.chunk.js} +1 -1
  84. package/build/{users-permissions-translation-pl-json.1dbdd4a1.chunk.js → users-permissions-translation-pl-json.c6a02992.chunk.js} +1 -1
  85. package/build/{users-permissions-translation-sv-json.d5d11648.chunk.js → users-permissions-translation-sv-json.370d6eee.chunk.js} +1 -1
  86. package/build/users-permissions-translation-tr-json.9bebc250.chunk.js +1 -0
  87. package/build/{users-permissions-translation-zh-json.92f406f9.chunk.js → users-permissions-translation-zh-json.1fea833f.chunk.js} +1 -1
  88. package/build/users-providers-settings-page.25dd858e.chunk.js +1 -0
  89. package/build/{users-roles-settings-page.ce5b582d.chunk.js → users-roles-settings-page.8482a999.chunk.js} +1 -1
  90. package/build/{webhook-edit-page.1215a6b7.chunk.js → webhook-edit-page.dcc3d145.chunk.js} +4 -4
  91. package/build/{webhook-list-page.b87821f2.chunk.js → webhook-list-page.894e6959.chunk.js} +1 -1
  92. package/ee/server/services/passport/provider-registry.js +1 -1
  93. package/package.json +10 -16
  94. package/server/controllers/admin.js +2 -0
  95. package/server/routes/admin.js +1 -1
  96. package/server/services/metrics.js +5 -2
  97. package/server/services/role.js +1 -0
  98. package/webpack.alias.js +0 -2
  99. package/admin/src/content-manager/components/BackHeader/index.js +0 -8
  100. package/admin/src/content-manager/components/Block/components.js +0 -28
  101. package/admin/src/content-manager/components/Block/index.js +0 -43
  102. package/admin/src/content-manager/components/Container/index.js +0 -7
  103. package/admin/src/content-manager/components/CustomInputCheckbox/components.js +0 -77
  104. package/admin/src/content-manager/components/CustomInputCheckbox/index.js +0 -53
  105. package/admin/src/content-manager/components/DynamicComponentCard/Wrapper.js +0 -63
  106. package/admin/src/content-manager/components/FilterOptionsCTA/index.js +0 -14
  107. package/admin/src/content-manager/components/FormTitle/index.js +0 -22
  108. package/admin/src/content-manager/components/FormWrapper/index.js +0 -20
  109. package/admin/src/content-manager/components/InputJSON/FieldError.js +0 -38
  110. package/admin/src/content-manager/components/LayoutTitle/index.js +0 -19
  111. package/admin/src/content-manager/components/PlusButton/index.js +0 -52
  112. package/admin/src/content-manager/components/PreviewCarret/components.js +0 -27
  113. package/admin/src/content-manager/components/PreviewCarret/index.js +0 -22
  114. package/admin/src/content-manager/components/SectionTitle/Title.js +0 -11
  115. package/admin/src/content-manager/components/SectionTitle/index.js +0 -26
  116. package/build/1551f4f60c37af51121f.woff2 +0 -0
  117. package/build/1e59d2330b4c6deb84b3.ttf +0 -0
  118. package/build/20fd1704ea223900efa9.woff2 +0 -0
  119. package/build/2285773e6b4b172f07d9.woff +0 -0
  120. package/build/23f19bb08961f37aaf69.eot +0 -0
  121. package/build/2f517e09eb2ca6650ff5.svg +0 -3717
  122. package/build/4306.df40a798.chunk.js +0 -98
  123. package/build/4318.80bdf035.chunk.js +0 -30
  124. package/build/4689f52cc96215721344.svg +0 -801
  125. package/build/491974d108fe4002b2aa.ttf +0 -0
  126. package/build/504.9aeff724.chunk.js +0 -758
  127. package/build/5057.195a59ff.chunk.js +0 -65
  128. package/build/527940b104eb2ea366c8.ttf +0 -0
  129. package/build/77206a6bb316fa0aded5.eot +0 -0
  130. package/build/7a3337626410ca2f4071.woff2 +0 -0
  131. package/build/7a8b4f130182d19a2d7c.svg +0 -5034
  132. package/build/805.e991a370.chunk.js +0 -138
  133. package/build/8176.b19bc128.chunk.js +0 -145
  134. package/build/8186.55910742.chunk.js +0 -169
  135. package/build/8881.c693411a.chunk.js +0 -245
  136. package/build/8b43027f47b20503057d.eot +0 -0
  137. package/build/9161.4a0ab137.chunk.js +0 -2119
  138. package/build/9279.6290c87a.chunk.js +0 -117
  139. package/build/9707.a0cc4ad8.chunk.js +0 -70
  140. package/build/9bbb245e67a133f6e486.eot +0 -0
  141. package/build/Admin-authenticatedApp.f9e74dc0.chunk.js +0 -80
  142. package/build/Admin_pluginsPage.3c872de7.chunk.js +0 -6
  143. package/build/admin-app.2861b6d2.chunk.js +0 -112
  144. package/build/admin-edit-users.85231e4c.chunk.js +0 -10
  145. package/build/bb58e57c48a3e911f15f.woff +0 -0
  146. package/build/be9ee23c0c6390141475.ttf +0 -0
  147. package/build/c1e38fd9e0e74ba58f7a.svg +0 -2671
  148. package/build/content-manager.ee948f75.chunk.js +0 -1186
  149. package/build/content-type-builder-list-view.4412efc3.chunk.js +0 -201
  150. package/build/content-type-builder-translation-de-json.0d7696b9.chunk.js +0 -1
  151. package/build/content-type-builder-translation-dk-json.4729f055.chunk.js +0 -1
  152. package/build/content-type-builder-translation-en-json.f985c9c4.chunk.js +0 -1
  153. package/build/content-type-builder-translation-es-json.333cf47f.chunk.js +0 -1
  154. package/build/content-type-builder-translation-ko-json.51201b12.chunk.js +0 -1
  155. package/build/content-type-builder-translation-pl-json.4a42349b.chunk.js +0 -1
  156. package/build/content-type-builder-translation-pt-BR-json.6fe3b8d1.chunk.js +0 -1
  157. package/build/content-type-builder-translation-sv-json.6deff030.chunk.js +0 -1
  158. package/build/content-type-builder-translation-tr-json.2e52bc60.chunk.js +0 -1
  159. package/build/content-type-builder-translation-zh-json.3b0afd31.chunk.js +0 -1
  160. package/build/content-type-builder.b132b5f4.chunk.js +0 -145
  161. package/build/d878b0a6a1144760244f.woff2 +0 -0
  162. package/build/eeccf4f66002c6f2ba24.woff +0 -0
  163. package/build/email-settings-page.db0d98d1.chunk.js +0 -15
  164. package/build/email-translation-tr-json.87f2feb3.chunk.js +0 -1
  165. package/build/en-json.4a56dca7.chunk.js +0 -1
  166. package/build/f691f37e57f04c152e23.woff +0 -0
  167. package/build/fontawesome-css-all.15068c6e.chunk.js +0 -4618
  168. package/build/fontawesome-css.418f40da.chunk.js +0 -6
  169. package/build/fontawesome-js.252cc5f3.chunk.js +0 -7
  170. package/build/main.faac89ee.js +0 -2025
  171. package/build/runtime~main.75a15b8e.js +0 -2
  172. package/build/sk-json.7ba4b330.chunk.js +0 -1
  173. package/build/sso-settings-page.adb12ac3.chunk.js +0 -1
  174. package/build/tr-json.9c44ea0c.chunk.js +0 -1
  175. package/build/upload-settings.450cab1a.chunk.js +0 -18
  176. package/build/upload-translation-en-json.86da7b0a.chunk.js +0 -1
  177. package/build/upload-translation-sk-json.b03d4904.chunk.js +0 -1
  178. package/build/upload.e2034370.chunk.js +0 -64
  179. package/build/users-email-settings-page.3126ff8c.chunk.js +0 -28
  180. package/build/users-permissions-translation-tr-json.cdc49a3c.chunk.js +0 -1
  181. package/build/users-providers-settings-page.b7b602e2.chunk.js +0 -33
@@ -1,43 +1,31 @@
1
1
  import React from 'react';
2
- import get from 'lodash/get';
3
- import PropTypes from 'prop-types';
4
- import { Flex } from '@strapi/design-system/Flex';
5
- import { Typography } from '@strapi/design-system/Typography';
6
- import { Box } from '@strapi/design-system/Box';
7
- import { Stack } from '@strapi/design-system/Stack';
8
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
2
  import styled from 'styled-components';
10
3
  import { Link } from 'react-router-dom';
4
+ import PropTypes from 'prop-types';
5
+ import { Box, Flex, Typography, Stack } from '@strapi/design-system';
6
+
7
+ import { ComponentIcon } from '../../../components/ComponentIcon';
11
8
  import useLayoutDnd from '../../../hooks/useLayoutDnd';
12
9
 
13
- const CustomFlex = styled(Flex)`
14
- border-radius: 50%;
15
- svg {
16
- & > * {
17
- fill: ${({ theme }) => theme.colors.neutral500};
18
- }
19
- width: 12px;
20
- height: 12px;
21
- }
22
- `;
23
10
  const CustomLink = styled(Flex)`
24
11
  text-decoration: none;
12
+
13
+ &:focus,
25
14
  &:hover {
26
15
  ${({ theme }) => `
27
- background: ${theme.colors.primary100};
28
- svg {
29
- & > * {
30
- fill: ${theme.colors.primary600};
31
- }
32
- }
16
+ background-color: ${theme.colors.primary100};
17
+ border-color: ${theme.colors.primary200};
18
+
33
19
  ${Typography} {
34
20
  color: ${theme.colors.primary600};
35
21
  }
36
- ${CustomFlex} {
37
- background: ${theme.colors.primary200};
38
- }
39
- border-color: ${theme.colors.primary200};
40
22
  `}
23
+
24
+ /* > ComponentIcon */
25
+ > div:first-child {
26
+ background: ${({ theme }) => theme.colors.primary200};
27
+ color: ${({ theme }) => theme.colors.primary600};
28
+ }
41
29
  }
42
30
  `;
43
31
 
@@ -61,19 +49,11 @@ const DynamicZoneList = ({ components }) => {
61
49
  as={Link}
62
50
  to={`/content-manager/components/${componentUid}/configurations/edit`}
63
51
  >
64
- <CustomFlex
65
- width={`${32 / 16}rem`}
66
- height={`${32 / 16}rem`}
67
- background="neutral150"
68
- justifyContent="center"
69
- alignItems="center"
70
- padding={2}
71
- >
72
- <FontAwesomeIcon icon={get(componentLayouts, [componentUid, 'info', 'icon'], '')} />
73
- </CustomFlex>
52
+ <ComponentIcon />
53
+
74
54
  <Box paddingTop={1}>
75
55
  <Typography fontSize={1} textColor="neutral600" fontWeight="bold">
76
- {get(componentLayouts, [componentUid, 'info', 'displayName'], '')}
56
+ {componentLayouts?.[componentUid]?.info?.displayName ?? ''}
77
57
  </Typography>
78
58
  </Box>
79
59
  </CustomLink>
@@ -1,11 +1,10 @@
1
1
  import React, { useState } from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { useIntl } from 'react-intl';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faQuestion, faTimes } from '@fortawesome/free-solid-svg-icons';
6
- import { Box } from '@strapi/design-system/Box';
7
- import { Typography } from '@strapi/design-system/Typography';
8
- import { FocusTrap } from '@strapi/design-system/FocusTrap';
4
+ import { Box, Flex, FocusTrap, Typography, Icon, Stack } from '@strapi/design-system';
5
+ import { Book, Cross, Information, Question } from '@strapi/icons';
6
+ import { pxToRem } from '@strapi/helper-plugin';
7
+
9
8
  import { useConfigurations } from '../../../hooks';
10
9
 
11
10
  const OnboardingWrapper = styled(Box)`
@@ -14,52 +13,44 @@ const OnboardingWrapper = styled(Box)`
14
13
  right: ${({ theme }) => theme.spaces[2]};
15
14
  `;
16
15
 
17
- const Button = styled.button`
16
+ const Button = styled(Box)`
18
17
  width: ${({ theme }) => theme.spaces[8]};
19
18
  height: ${({ theme }) => theme.spaces[8]};
20
19
  background: ${({ theme }) => theme.colors.primary600};
21
20
  box-shadow: ${({ theme }) => theme.shadows.tableShadow};
22
21
  border-radius: 50%;
23
- svg {
24
- color: ${({ theme }) => theme.colors.buttonNeutral0};
22
+
23
+ svg path {
24
+ fill: ${({ theme }) => theme.colors.buttonNeutral0};
25
25
  }
26
26
  `;
27
27
 
28
28
  const LinksWrapper = styled(Box)`
29
- position: absolute;
30
29
  bottom: ${({ theme }) => `${theme.spaces[9]}`};
30
+ min-width: ${200 / 16}rem;
31
+ position: absolute;
31
32
  right: 0;
32
- width: ${200 / 16}rem;
33
33
  `;
34
34
 
35
- const StyledLink = styled.a`
36
- display: flex;
37
- align-items: center;
35
+ const StyledLink = styled(Flex)`
38
36
  text-decoration: none;
39
- padding: ${({ theme }) => theme.spaces[2]};
40
- padding-left: ${({ theme }) => theme.spaces[5]};
41
37
 
42
- svg {
43
- color: ${({ theme }) => theme.colors.neutral600};
44
- margin-right: ${({ theme }) => theme.spaces[2]};
38
+ svg path {
39
+ fill: ${({ theme }) => theme.colors.neutral600};
45
40
  }
46
41
 
42
+ &:focus,
47
43
  &:hover {
48
44
  background: ${({ theme }) => theme.colors.neutral100};
49
- color: ${({ theme }) => theme.colors.neutral500};
50
45
 
51
- svg {
52
- color: ${({ theme }) => theme.colors.neutral700};
46
+ svg path {
47
+ fill: ${({ theme }) => theme.colors.neutral700};
53
48
  }
54
49
 
55
50
  ${[Typography]} {
56
51
  color: ${({ theme }) => theme.colors.neutral700};
57
52
  }
58
53
  }
59
-
60
- ${[Typography]} {
61
- color: ${({ theme }) => theme.colors.neutral600};
62
- }
63
54
  `;
64
55
 
65
56
  const Onboarding = () => {
@@ -71,9 +62,9 @@ const Onboarding = () => {
71
62
  return null;
72
63
  }
73
64
 
74
- const staticLinks = [
65
+ const STATIC_LINKS = [
75
66
  {
76
- icon: 'book',
67
+ Icon: <Book />,
77
68
  label: formatMessage({
78
69
  id: 'global.documentation',
79
70
  defaultMessage: 'Documentation',
@@ -81,7 +72,7 @@ const Onboarding = () => {
81
72
  destination: 'https://docs.strapi.io',
82
73
  },
83
74
  {
84
- icon: 'file',
75
+ Icon: <Information />,
85
76
  label: formatMessage({ id: 'app.static.links.cheatsheet', defaultMessage: 'CheatSheet' }),
86
77
  destination: 'https://strapi-showcase.s3-us-west-2.amazonaws.com/CheatSheet.pdf',
87
78
  },
@@ -94,37 +85,44 @@ const Onboarding = () => {
94
85
  return (
95
86
  <OnboardingWrapper as="aside">
96
87
  <Button
88
+ as="button"
97
89
  id="onboarding"
98
- aria-label={formatMessage({
99
- id: 'app.components.Onboarding.help.button',
100
- defaultMessage: 'Help button',
101
- })}
90
+ aria-label={formatMessage(
91
+ isOpen
92
+ ? {
93
+ id: 'app.components.Onboarding.help.button-close',
94
+ defaultMessage: 'Close help menu',
95
+ }
96
+ : {
97
+ id: 'app.components.Onboarding.help.button',
98
+ defaultMessage: 'Open help menu',
99
+ }
100
+ )}
102
101
  onClick={handleClick}
103
102
  >
104
- {!isOpen && <FontAwesomeIcon icon={faQuestion} />}
105
- {isOpen && <FontAwesomeIcon icon={faTimes} />}
103
+ <Icon as={isOpen ? Cross : Question} height={pxToRem(16)} width={pxToRem(16)} />
106
104
  </Button>
107
105
 
108
106
  {/* FIX ME - replace with popover when overflow popover is fixed
109
107
  + when v4 mockups for onboarding component are ready */}
110
108
  {isOpen && (
111
109
  <FocusTrap onEscape={handleClick}>
112
- <LinksWrapper
113
- background="neutral0"
114
- hasRadius
115
- shadow="tableShadow"
116
- paddingBottom={2}
117
- paddingTop={2}
118
- >
119
- {staticLinks.map((link) => (
110
+ <LinksWrapper background="neutral0" hasRadius shadow="tableShadow" padding={2}>
111
+ {STATIC_LINKS.map((link) => (
120
112
  <StyledLink
113
+ as="a"
121
114
  key={link.label}
122
115
  rel="nofollow noreferrer noopener"
123
116
  target="_blank"
124
117
  href={link.destination}
118
+ padding={2}
119
+ hasRadius
120
+ alignItems="center"
125
121
  >
126
- <FontAwesomeIcon icon={link.icon} />
127
- <Typography>{link.label}</Typography>
122
+ <Stack horizontal spacing={2}>
123
+ {link.Icon}
124
+ <Typography color="neutral600">{link.label}</Typography>
125
+ </Stack>
128
126
  </StyledLink>
129
127
  ))}
130
128
  </LinksWrapper>
@@ -25,7 +25,7 @@ import NotFoundPage from '../NotFoundPage';
25
25
  import UseCasePage from '../UseCasePage';
26
26
  import { getUID } from './utils';
27
27
  import routes from './utils/routes';
28
- import { useConfigurations } from '../../hooks';
28
+ import { useConfigurations, useFetchClient } from '../../hooks';
29
29
 
30
30
  const AuthenticatedApp = lazy(() =>
31
31
  import(/* webpackChunkName: "Admin-authenticatedApp" */ '../../components/AuthenticatedApp')
@@ -35,8 +35,12 @@ function App() {
35
35
  const toggleNotification = useNotification();
36
36
  const { updateProjectSettings } = useConfigurations();
37
37
  const { formatMessage } = useIntl();
38
- const [{ isLoading, hasAdmin, uuid }, setState] = useState({ isLoading: true, hasAdmin: false });
38
+ const [{ isLoading, hasAdmin, uuid, deviceId }, setState] = useState({
39
+ isLoading: true,
40
+ hasAdmin: false,
41
+ });
39
42
  const appInfo = useAppInfos();
43
+ const { get } = useFetchClient();
40
44
 
41
45
  const authRoutes = useMemo(() => {
42
46
  return makeUniqueRoutes(
@@ -80,27 +84,29 @@ function App() {
80
84
  } = await axios.get(`${strapi.backendURL}/admin/init`);
81
85
 
82
86
  updateProjectSettings({ menuLogo: prefixFileUrlWithBackendUrl(menuLogo) });
87
+ const deviceId = await getUID();
83
88
 
84
89
  if (uuid) {
85
90
  const {
86
91
  data: { data: properties },
87
- } = await axios.get(`${strapi.backendURL}/admin/telemetry-properties`);
92
+ } = await get(`/admin/telemetry-properties`, {
93
+ // NOTE: needed because the interceptors of the fetchClient redirect to /login when receive a 401 and it would end up in an infinite loop when the user doesn't have a session.
94
+ validateStatus: (status) => status < 500,
95
+ });
88
96
 
89
97
  setTelemetryProperties(properties);
90
98
 
91
99
  try {
92
- const deviceId = await getUID();
93
-
94
- await fetch('https://analytics.strapi.io/track', {
100
+ await fetch('https://analytics.strapi.io/api/v2/track', {
95
101
  method: 'POST',
96
102
  body: JSON.stringify({
103
+ // This event is anonymous
97
104
  event: 'didInitializeAdministration',
98
- uuid,
105
+ userId: '',
99
106
  deviceId,
100
- properties: {
101
- ...properties,
102
- environment: appInfo.currentEnvironment,
103
- },
107
+ eventPropeties: {},
108
+ userProperties: { environment: appInfo.currentEnvironment },
109
+ groupProperties: { ...properties, projectId: uuid },
104
110
  }),
105
111
  headers: {
106
112
  'Content-Type': 'application/json',
@@ -111,7 +117,7 @@ function App() {
111
117
  }
112
118
  }
113
119
 
114
- setState({ isLoading: false, hasAdmin, uuid });
120
+ setState({ isLoading: false, hasAdmin, uuid, deviceId });
115
121
  } catch (err) {
116
122
  toggleNotification({
117
123
  type: 'warning',
@@ -130,8 +136,9 @@ function App() {
130
136
  () => ({
131
137
  uuid,
132
138
  telemetryProperties,
139
+ deviceId,
133
140
  }),
134
- [uuid, telemetryProperties]
141
+ [uuid, telemetryProperties, deviceId]
135
142
  );
136
143
 
137
144
  if (isLoading) {
@@ -268,7 +268,7 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
268
268
  required
269
269
  label={formatMessage({
270
270
  id: 'Auth.form.confirmPassword.label',
271
- defaultMessage: 'Confirmation Password',
271
+ defaultMessage: 'Confirm Password',
272
272
  })}
273
273
  type={confirmPasswordShown ? 'text' : 'password'}
274
274
  />
@@ -154,7 +154,7 @@ const ForgotPassword = ({ onSubmit, schema }) => {
154
154
  required
155
155
  label={formatMessage({
156
156
  id: 'Auth.form.confirmPassword.label',
157
- defaultMessage: 'Confirmation Password',
157
+ defaultMessage: 'Confirm Password',
158
158
  })}
159
159
  type={confirmPasswordShown ? 'text' : 'password'}
160
160
  />
@@ -12,7 +12,6 @@ import {
12
12
  } from '@strapi/helper-plugin';
13
13
  import { Main } from '@strapi/design-system/Main';
14
14
  import { Formik } from 'formik';
15
- import { get } from 'lodash';
16
15
  import { useRouteMatch, useHistory } from 'react-router-dom';
17
16
  import { useQuery } from 'react-query';
18
17
  import { formatAPIErrors } from '../../../../../utils';
@@ -205,12 +204,12 @@ const ApiTokenCreateView = () => {
205
204
  if (err?.response?.data?.error?.message === MSG_ERROR_NAME_TAKEN) {
206
205
  toggleNotification({
207
206
  type: 'warning',
208
- message: get(err, 'response.data.message', 'notification.error.tokennamenotunique'),
207
+ message: err.response.data.message || 'notification.error.tokennamenotunique',
209
208
  });
210
209
  } else {
211
210
  toggleNotification({
212
211
  type: 'warning',
213
- message: get(err, 'response.data.message', 'notification.error'),
212
+ message: err?.response?.data?.message || 'notification.error',
214
213
  });
215
214
  }
216
215
  unlockApp();
@@ -11,7 +11,7 @@
11
11
  "Auth.form.button.login.strapi": "Log in via Strapi",
12
12
  "Auth.form.button.password-recovery": "Password Recovery",
13
13
  "Auth.form.button.register": "Let's start",
14
- "Auth.form.confirmPassword.label": "Confirmation Password",
14
+ "Auth.form.confirmPassword.label": "Confirm Password",
15
15
  "Auth.form.currentPassword.label": "Current Password",
16
16
  "Auth.form.email.label": "Email",
17
17
  "Auth.form.email.placeholder": "e.g. kai@doe.com",
@@ -460,6 +460,7 @@
460
460
  "app.utils.select-filter": "Select filter",
461
461
  "app.utils.unpublish": "Unpublish",
462
462
  "clearLabel": "Clear",
463
+ "selectButtonTitle": "Select",
463
464
  "coming.soon": "This content is currently under construction and will be back in a few weeks!",
464
465
  "component.Input.error.validation.integer": "The value must be an integer",
465
466
  "components.AutoReloadBlocker.description": "Run Strapi with one of the following commands:",