@strapi/admin 4.0.8 → 4.1.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.
- package/admin/src/components/AuthenticatedApp/index.js +25 -3
- package/admin/src/components/AuthenticatedApp/utils/api.js +15 -1
- package/admin/src/components/GuidedTour/Homepage/components/Step.js +61 -0
- package/admin/src/components/GuidedTour/Homepage/components/Stepper.js +58 -0
- package/admin/src/components/GuidedTour/Homepage/index.js +63 -0
- package/admin/src/components/GuidedTour/Modal/components/Content.js +50 -0
- package/admin/src/components/GuidedTour/Modal/components/Modal.js +75 -0
- package/admin/src/components/GuidedTour/Modal/components/StepNumberWithPadding.js +24 -0
- package/admin/src/components/GuidedTour/Modal/components/Stepper.js +119 -0
- package/admin/src/components/GuidedTour/Modal/index.js +90 -0
- package/admin/src/components/GuidedTour/Modal/reducer.js +29 -0
- package/admin/src/components/GuidedTour/Stepper/StepLine.js +27 -0
- package/admin/src/components/GuidedTour/Stepper/StepNumber.js +71 -0
- package/admin/src/components/GuidedTour/constants.js +3 -0
- package/admin/src/components/GuidedTour/index.js +100 -0
- package/admin/src/components/GuidedTour/init.js +36 -0
- package/admin/src/components/GuidedTour/layout.js +153 -0
- package/admin/src/components/GuidedTour/reducer.js +50 -0
- package/admin/src/components/GuidedTour/utils/arePreviousSectionsDone.js +13 -0
- package/admin/src/components/GuidedTour/utils/arePreviousStepsDone.js +12 -0
- package/admin/src/components/GuidedTour/utils/isGuidedTourCompleted.js +6 -0
- package/admin/src/components/GuidedTour/utils/persistStateToLocaleStorage.js +34 -0
- package/admin/src/components/Providers/index.js +4 -1
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +14 -1
- package/admin/src/content-manager/components/DynamicTable/CellContent/CellValue.js +2 -1
- package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +5 -1
- package/admin/src/content-manager/pages/App/index.js +15 -2
- package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +1 -1
- package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +22 -4
- package/admin/src/content-manager/pages/ListSettingsView/reducer.js +1 -1
- package/admin/src/pages/Admin/index.js +2 -0
- package/admin/src/pages/AuthPage/components/Register/index.js +11 -6
- package/admin/src/pages/AuthPage/index.js +15 -1
- package/admin/src/pages/HomePage/index.js +8 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ContentBox/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +3 -0
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/index.js +10 -1
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/components/RoleRow/index.js +2 -2
- package/admin/src/translations/ar.json +0 -4
- package/admin/src/translations/cs.json +0 -6
- package/admin/src/translations/de.json +0 -12
- package/admin/src/translations/dk.json +158 -170
- package/admin/src/translations/en.json +43 -29
- package/admin/src/translations/es.json +15 -25
- package/admin/src/translations/fr.json +158 -169
- package/admin/src/translations/he.json +0 -10
- package/admin/src/translations/hu.json +16 -26
- package/admin/src/translations/id.json +0 -12
- package/admin/src/translations/it.json +0 -12
- package/admin/src/translations/ja.json +16 -28
- package/admin/src/translations/ko.json +663 -670
- package/admin/src/translations/ms.json +0 -6
- package/admin/src/translations/nl.json +16 -30
- package/admin/src/translations/no.json +0 -10
- package/admin/src/translations/pl.json +0 -12
- package/admin/src/translations/pt-BR.json +19 -29
- package/admin/src/translations/pt.json +0 -4
- package/admin/src/translations/ru.json +0 -12
- package/admin/src/translations/sk.json +0 -12
- package/admin/src/translations/sv.json +0 -4
- package/admin/src/translations/th.json +0 -12
- package/admin/src/translations/tr.json +0 -4
- package/admin/src/translations/uk.json +0 -6
- package/admin/src/translations/vi.json +0 -4
- package/admin/src/translations/zh-Hans.json +15 -25
- package/admin/src/translations/zh.json +24 -27
- package/build/2736.ee6e45c9.chunk.js +2 -0
- package/build/{460.639962f0.chunk.js.LICENSE.txt → 2736.ee6e45c9.chunk.js.LICENSE.txt} +0 -0
- package/build/4362.d0c1a04a.chunk.js +1 -0
- package/build/4800.18e59c83.chunk.js +1 -0
- package/build/{3215.4d042146.chunk.js → 8042.9b85175a.chunk.js} +2 -2
- package/build/{3215.4d042146.chunk.js.LICENSE.txt → 8042.9b85175a.chunk.js.LICENSE.txt} +0 -0
- package/build/9988.b4229043.chunk.js +2 -0
- package/build/{4741.c2bfe032.chunk.js.LICENSE.txt → 9988.b4229043.chunk.js.LICENSE.txt} +0 -0
- package/build/Admin-authenticatedApp.013e2774.chunk.js +1 -0
- package/build/Admin_homePage.e4779166.chunk.js +1 -0
- package/build/{Admin_settingsPage.05877e0b.chunk.js → Admin_settingsPage.2d0d2cca.chunk.js} +1 -1
- package/build/api-tokens-create-page.0981141a.chunk.js +1 -0
- package/build/api-tokens-edit-page.3faf1af1.chunk.js +1 -0
- package/build/{api-tokens-list-page.e071058b.chunk.js → api-tokens-list-page.26a05a21.chunk.js} +1 -1
- package/build/ar-json.6a2565af.chunk.js +1 -0
- package/build/content-manager.141d110d.chunk.js +1 -0
- package/build/{content-type-builder-translation-cs-json.2f7e2289.chunk.js → content-type-builder-translation-cs-json.89f7272e.chunk.js} +1 -1
- package/build/{content-type-builder-translation-de-json.46017754.chunk.js → content-type-builder-translation-de-json.0205697c.chunk.js} +1 -1
- package/build/content-type-builder-translation-dk-json.235ff56e.chunk.js +1 -0
- package/build/{content-type-builder-translation-en-json.d70fc3af.chunk.js → content-type-builder-translation-en-json.b3d8e9d4.chunk.js} +1 -1
- package/build/{content-type-builder-translation-es-json.20c177ee.chunk.js → content-type-builder-translation-es-json.13b2e2aa.chunk.js} +1 -1
- package/build/{content-type-builder-translation-fr-json.8f66eb66.chunk.js → content-type-builder-translation-fr-json.bee621f7.chunk.js} +1 -1
- package/build/{content-type-builder-translation-id-json.aab2f426.chunk.js → content-type-builder-translation-id-json.2fbf4f8c.chunk.js} +1 -1
- package/build/{content-type-builder-translation-it-json.4c91e895.chunk.js → content-type-builder-translation-it-json.a1afd7a9.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ja-json.c239ba90.chunk.js → content-type-builder-translation-ja-json.1459fb88.chunk.js} +1 -1
- package/build/content-type-builder-translation-ko-json.d2080111.chunk.js +1 -0
- package/build/{content-type-builder-translation-ms-json.124be88c.chunk.js → content-type-builder-translation-ms-json.048122eb.chunk.js} +1 -1
- package/build/{content-type-builder-translation-nl-json.98a240b8.chunk.js → content-type-builder-translation-nl-json.8d59e86b.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pl-json.2abc61bd.chunk.js → content-type-builder-translation-pl-json.01dc068c.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-BR-json.c0415545.chunk.js → content-type-builder-translation-pt-BR-json.d311d056.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-json.ab3e086d.chunk.js → content-type-builder-translation-pt-json.4893266f.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ru-json.1a6779fd.chunk.js → content-type-builder-translation-ru-json.1285874d.chunk.js} +1 -1
- package/build/{content-type-builder-translation-sk-json.5c82f020.chunk.js → content-type-builder-translation-sk-json.0064156b.chunk.js} +1 -1
- package/build/{content-type-builder-translation-th-json.24ee19eb.chunk.js → content-type-builder-translation-th-json.5f690524.chunk.js} +1 -1
- package/build/{content-type-builder-translation-tr-json.30434835.chunk.js → content-type-builder-translation-tr-json.696283a5.chunk.js} +1 -1
- package/build/{content-type-builder-translation-uk-json.771662ef.chunk.js → content-type-builder-translation-uk-json.87496bf9.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-Hans-json.070020ae.chunk.js → content-type-builder-translation-zh-Hans-json.283c640e.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-json.9708310d.chunk.js → content-type-builder-translation-zh-json.77aa2275.chunk.js} +1 -1
- package/build/content-type-builder.f1cef05c.chunk.js +1 -0
- package/build/cs-json.8df09876.chunk.js +1 -0
- package/build/de-json.6e14f607.chunk.js +1 -0
- package/build/dk-json.be388470.chunk.js +1 -0
- package/build/en-json.bb614bb0.chunk.js +1 -0
- package/build/es-json.61553168.chunk.js +1 -0
- package/build/fr-json.a9ce0700.chunk.js +1 -0
- package/build/he-json.1742494e.chunk.js +1 -0
- package/build/hu-json.e667d285.chunk.js +1 -0
- package/build/i18n-translation-dk-json.ecf02d28.chunk.js +1 -0
- package/build/i18n-translation-en-json.4d823f62.chunk.js +1 -0
- package/build/i18n-translation-es-json.7049afa2.chunk.js +1 -0
- package/build/i18n-translation-fr-json.c6367bc9.chunk.js +1 -0
- package/build/i18n-translation-ko-json.aecb7e01.chunk.js +1 -0
- package/build/i18n-translation-zh-Hans-json.258b2e1a.chunk.js +1 -0
- package/build/id-json.d87ebb20.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/it-json.a2880b81.chunk.js +1 -0
- package/build/ja-json.46e29f04.chunk.js +1 -0
- package/build/ko-json.dd36fdc0.chunk.js +1 -0
- package/build/{main.59b96514.js → main.fc123ed7.js} +2 -2
- package/build/{main.59b96514.js.LICENSE.txt → main.fc123ed7.js.LICENSE.txt} +0 -0
- package/build/ms-json.3a062984.chunk.js +1 -0
- package/build/nl-json.30ce02cb.chunk.js +1 -0
- package/build/no-json.9af40e9d.chunk.js +1 -0
- package/build/pl-json.fd373053.chunk.js +1 -0
- package/build/pt-BR-json.30e2d716.chunk.js +1 -0
- package/build/pt-json.3aaf9e05.chunk.js +1 -0
- package/build/ru-json.78c56e1c.chunk.js +1 -0
- package/build/{runtime~main.75c67df1.js → runtime~main.0866074a.js} +1 -1
- package/build/sk-json.c0bf144c.chunk.js +1 -0
- package/build/sv-json.aad187b9.chunk.js +1 -0
- package/build/th-json.e2b4a0fb.chunk.js +1 -0
- package/build/tr-json.0add11cd.chunk.js +1 -0
- package/build/uk-json.eb78e77e.chunk.js +1 -0
- package/build/{upload-settings.62631a39.chunk.js → upload-settings.8e7cbc3b.chunk.js} +1 -1
- package/build/{upload-translation-de-json.00f90715.chunk.js → upload-translation-de-json.1308dce5.chunk.js} +1 -1
- package/build/upload-translation-dk-json.0d4e855f.chunk.js +1 -0
- package/build/upload-translation-en-json.c3373c8d.chunk.js +1 -0
- package/build/upload-translation-es-json.81b13eac.chunk.js +1 -0
- package/build/{upload-translation-fr-json.ccb4ad8b.chunk.js → upload-translation-fr-json.1bec79ec.chunk.js} +1 -1
- package/build/upload-translation-he-json.1d28982f.chunk.js +1 -0
- package/build/{upload-translation-it-json.c1809a47.chunk.js → upload-translation-it-json.7d4bdc5a.chunk.js} +1 -1
- package/build/{upload-translation-ja-json.71aa85eb.chunk.js → upload-translation-ja-json.97fcacd8.chunk.js} +1 -1
- package/build/upload-translation-ko-json.d7345fe1.chunk.js +1 -0
- package/build/{upload-translation-ms-json.be669f81.chunk.js → upload-translation-ms-json.081effd5.chunk.js} +1 -1
- package/build/{upload-translation-pl-json.67685825.chunk.js → upload-translation-pl-json.2dfe78bb.chunk.js} +1 -1
- package/build/{upload-translation-pt-BR-json.f7b1133d.chunk.js → upload-translation-pt-BR-json.65936d7b.chunk.js} +1 -1
- package/build/{upload-translation-ru-json.54c031aa.chunk.js → upload-translation-ru-json.2d3b6f69.chunk.js} +1 -1
- package/build/{upload-translation-sk-json.f643dfc2.chunk.js → upload-translation-sk-json.f15c7fd6.chunk.js} +1 -1
- package/build/upload-translation-th-json.6d3c2370.chunk.js +1 -0
- package/build/{upload-translation-uk-json.1a90e73c.chunk.js → upload-translation-uk-json.a6c38449.chunk.js} +1 -1
- package/build/{upload-translation-zh-Hans-json.ac1dc0b9.chunk.js → upload-translation-zh-Hans-json.f6b26c45.chunk.js} +1 -1
- package/build/{upload-translation-zh-json.164ac601.chunk.js → upload-translation-zh-json.06052336.chunk.js} +1 -1
- package/build/users-permissions-translation-dk-json.89d41c4b.chunk.js +1 -0
- package/build/vi-json.55a11ac0.chunk.js +1 -0
- package/build/zh-Hans-json.55f6475b.chunk.js +1 -0
- package/build/zh-json.c3c2b225.chunk.js +1 -0
- package/package.json +6 -6
- package/build/4362.e3d2d72b.chunk.js +0 -1
- package/build/460.639962f0.chunk.js +0 -2
- package/build/4741.c2bfe032.chunk.js +0 -2
- package/build/Admin-authenticatedApp.f65c428a.chunk.js +0 -1
- package/build/Admin_homePage.a20b5e76.chunk.js +0 -1
- package/build/api-tokens-create-page.10586e16.chunk.js +0 -1
- package/build/api-tokens-edit-page.f9e3038d.chunk.js +0 -1
- package/build/ar-json.d79e4709.chunk.js +0 -1
- package/build/content-manager.07db1dd9.chunk.js +0 -1
- package/build/content-type-builder-translation-dk-json.098bd218.chunk.js +0 -1
- package/build/content-type-builder-translation-ko-json.2a5e0769.chunk.js +0 -1
- package/build/content-type-builder.52f5975c.chunk.js +0 -1
- package/build/cs-json.b8ba75b8.chunk.js +0 -1
- package/build/de-json.e01bdeae.chunk.js +0 -1
- package/build/dk-json.7356ea4b.chunk.js +0 -1
- package/build/en-json.3422a59e.chunk.js +0 -1
- package/build/es-json.ed9c8bef.chunk.js +0 -1
- package/build/fr-json.390bcdeb.chunk.js +0 -1
- package/build/he-json.86f9e663.chunk.js +0 -1
- package/build/hu-json.a741d263.chunk.js +0 -1
- package/build/i18n-translation-dk-json.932d3cc2.chunk.js +0 -1
- package/build/i18n-translation-en-json.239b740f.chunk.js +0 -1
- package/build/i18n-translation-es-json.347904f3.chunk.js +0 -1
- package/build/i18n-translation-fr-json.b52474fc.chunk.js +0 -1
- package/build/i18n-translation-ko-json.e88e11ef.chunk.js +0 -1
- package/build/i18n-translation-zh-Hans-json.4c17fed0.chunk.js +0 -1
- package/build/id-json.0b0c9731.chunk.js +0 -1
- package/build/it-json.939916bc.chunk.js +0 -1
- package/build/ja-json.52581a2a.chunk.js +0 -1
- package/build/ko-json.29633034.chunk.js +0 -1
- package/build/ms-json.5e5d12f9.chunk.js +0 -1
- package/build/nl-json.ac661b7f.chunk.js +0 -1
- package/build/no-json.ff46b126.chunk.js +0 -1
- package/build/pl-json.6bff1d54.chunk.js +0 -1
- package/build/pt-BR-json.8b3f799d.chunk.js +0 -1
- package/build/pt-json.b23d9a79.chunk.js +0 -1
- package/build/ru-json.bff93229.chunk.js +0 -1
- package/build/sk-json.a40bc2c8.chunk.js +0 -1
- package/build/sv-json.8ac61ecf.chunk.js +0 -1
- package/build/th-json.6e4502a3.chunk.js +0 -1
- package/build/tr-json.eaca955b.chunk.js +0 -1
- package/build/uk-json.da2ed14e.chunk.js +0 -1
- package/build/upload-translation-dk-json.bc6af8b4.chunk.js +0 -1
- package/build/upload-translation-en-json.6b529046.chunk.js +0 -1
- package/build/upload-translation-es-json.b53d6641.chunk.js +0 -1
- package/build/upload-translation-he-json.5dc34ea8.chunk.js +0 -1
- package/build/upload-translation-ko-json.da369eef.chunk.js +0 -1
- package/build/upload-translation-th-json.88ee2090.chunk.js +0 -1
- package/build/users-permissions-translation-dk-json.3e0295e5.chunk.js +0 -1
- package/build/vi-json.e993857a.chunk.js +0 -1
- package/build/zh-Hans-json.5843950b.chunk.js +0 -1
- package/build/zh-json.2e4c9ef4.chunk.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { PropTypes } from 'prop-types';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
@@ -36,6 +36,24 @@ const SortDisplayedFields = ({
|
|
|
36
36
|
}) => {
|
|
37
37
|
const { formatMessage } = useIntl();
|
|
38
38
|
const [isDraggingSibling, setIsDraggingSibling] = useState(false);
|
|
39
|
+
const [lastAction, setLastAction] = useState(null);
|
|
40
|
+
const scrollableContainerRef = useRef();
|
|
41
|
+
|
|
42
|
+
function handleAddField(...args) {
|
|
43
|
+
setLastAction('add');
|
|
44
|
+
onAddField(...args);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function handleRemoveField(...args) {
|
|
48
|
+
setLastAction('remove');
|
|
49
|
+
onRemoveField(...args);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (lastAction === 'add' && scrollableContainerRef?.current) {
|
|
54
|
+
scrollableContainerRef.current.scrollLeft = scrollableContainerRef.current.scrollWidth;
|
|
55
|
+
}
|
|
56
|
+
}, [displayedFields, lastAction]);
|
|
39
57
|
|
|
40
58
|
return (
|
|
41
59
|
<>
|
|
@@ -56,7 +74,7 @@ const SortDisplayedFields = ({
|
|
|
56
74
|
borderWidth="1px"
|
|
57
75
|
hasRadius
|
|
58
76
|
>
|
|
59
|
-
<ScrollableContainer size="1" paddingBottom={4}>
|
|
77
|
+
<ScrollableContainer size="1" paddingBottom={4} ref={scrollableContainerRef}>
|
|
60
78
|
<Stack horizontal size={3}>
|
|
61
79
|
{displayedFields.map((field, index) => (
|
|
62
80
|
<DraggableCard
|
|
@@ -65,7 +83,7 @@ const SortDisplayedFields = ({
|
|
|
65
83
|
isDraggingSibling={isDraggingSibling}
|
|
66
84
|
onMoveField={onMoveField}
|
|
67
85
|
onClickEditField={onClickEditField}
|
|
68
|
-
onRemoveField={e =>
|
|
86
|
+
onRemoveField={e => handleRemoveField(e, index)}
|
|
69
87
|
name={field}
|
|
70
88
|
labelField={metadatas[field].list.label || field}
|
|
71
89
|
setIsDraggingSibling={setIsDraggingSibling}
|
|
@@ -85,7 +103,7 @@ const SortDisplayedFields = ({
|
|
|
85
103
|
data-testid="add-field"
|
|
86
104
|
>
|
|
87
105
|
{listRemainingFields.map(field => (
|
|
88
|
-
<MenuItem key={field} onClick={() =>
|
|
106
|
+
<MenuItem key={field} onClick={() => handleAddField(field)}>
|
|
89
107
|
{field}
|
|
90
108
|
</MenuItem>
|
|
91
109
|
))}
|
|
@@ -17,7 +17,7 @@ const reducer = (state = initialState, action) =>
|
|
|
17
17
|
switch (action.type) {
|
|
18
18
|
case 'ADD_FIELD': {
|
|
19
19
|
const layoutFieldList = get(state, layoutFieldListPath, []);
|
|
20
|
-
set(draftState, layoutFieldListPath, [action.item
|
|
20
|
+
set(draftState, layoutFieldListPath, [...layoutFieldList, action.item]);
|
|
21
21
|
break;
|
|
22
22
|
}
|
|
23
23
|
case 'MOVE_FIELD': {
|
|
@@ -15,6 +15,7 @@ import AppLayout from '../../layouts/AppLayout';
|
|
|
15
15
|
import { useMenu, useReleaseNotification } from '../../hooks';
|
|
16
16
|
import Onboarding from './Onboarding';
|
|
17
17
|
import { createRoute } from '../../utils';
|
|
18
|
+
import GuidedTourModal from '../../components/GuidedTour/Modal';
|
|
18
19
|
|
|
19
20
|
const CM = lazy(() =>
|
|
20
21
|
import(/* webpackChunkName: "content-manager" */ '../../content-manager/pages/App')
|
|
@@ -92,6 +93,7 @@ const Admin = () => {
|
|
|
92
93
|
<Route path="" component={NotFoundPage} />
|
|
93
94
|
</Switch>
|
|
94
95
|
</Suspense>
|
|
96
|
+
<GuidedTourModal />
|
|
95
97
|
<Onboarding />
|
|
96
98
|
</AppLayout>
|
|
97
99
|
</DndProvider>
|
|
@@ -10,7 +10,7 @@ import { Flex } from '@strapi/design-system/Flex';
|
|
|
10
10
|
import { Link } from '@strapi/design-system/Link';
|
|
11
11
|
import { Button } from '@strapi/design-system/Button';
|
|
12
12
|
import { TextInput } from '@strapi/design-system/TextInput';
|
|
13
|
-
import { Checkbox } from '@strapi/design-system/Checkbox';
|
|
13
|
+
// import { Checkbox } from '@strapi/design-system/Checkbox';
|
|
14
14
|
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
|
15
15
|
import { Typography } from '@strapi/design-system/Typography';
|
|
16
16
|
import EyeStriked from '@strapi/icons/EyeStriked';
|
|
@@ -30,9 +30,12 @@ import FieldActionWrapper from '../FieldActionWrapper';
|
|
|
30
30
|
const CenteredBox = styled(Box)`
|
|
31
31
|
text-align: center;
|
|
32
32
|
`;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
|
|
34
|
+
// Experiment only until the next release
|
|
35
|
+
// To uncomment then
|
|
36
|
+
// const A = styled.a`
|
|
37
|
+
// color: ${({ theme }) => theme.colors.primary600};
|
|
38
|
+
// `;
|
|
36
39
|
|
|
37
40
|
const PasswordInput = styled(TextInput)`
|
|
38
41
|
::-ms-reveal {
|
|
@@ -271,7 +274,9 @@ const Register = ({ fieldsToDisable, noSignin, onSubmit, schema }) => {
|
|
|
271
274
|
})}
|
|
272
275
|
type={confirmPasswordShown ? 'text' : 'password'}
|
|
273
276
|
/>
|
|
274
|
-
|
|
277
|
+
{/* Experiment only until the next release
|
|
278
|
+
To uncomment then */}
|
|
279
|
+
{/* <Checkbox
|
|
275
280
|
onValueChange={checked => {
|
|
276
281
|
handleChange({ target: { value: checked, name: 'news' } });
|
|
277
282
|
}}
|
|
@@ -304,7 +309,7 @@ const Register = ({ fieldsToDisable, noSignin, onSubmit, schema }) => {
|
|
|
304
309
|
),
|
|
305
310
|
}
|
|
306
311
|
)}
|
|
307
|
-
</Checkbox>
|
|
312
|
+
</Checkbox> */}
|
|
308
313
|
<Button fullWidth size="L" type="submit">
|
|
309
314
|
{formatMessage({
|
|
310
315
|
id: 'Auth.form.button.register',
|
|
@@ -4,9 +4,10 @@ import camelCase from 'lodash/camelCase';
|
|
|
4
4
|
import get from 'lodash/get';
|
|
5
5
|
import omit from 'lodash/omit';
|
|
6
6
|
import { Redirect, useRouteMatch, useHistory } from 'react-router-dom';
|
|
7
|
-
import { auth, useQuery } from '@strapi/helper-plugin';
|
|
7
|
+
import { auth, useQuery, useGuidedTour } from '@strapi/helper-plugin';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import forms from 'ee_else_ce/pages/AuthPage/utils/forms';
|
|
10
|
+
import persistStateToLocaleStorage from '../../components/GuidedTour/utils/persistStateToLocaleStorage';
|
|
10
11
|
import useLocalesProvider from '../../components/LocalesProvider/useLocalesProvider';
|
|
11
12
|
import formatAPIErrors from '../../utils/formatAPIErrors';
|
|
12
13
|
import init from './init';
|
|
@@ -15,6 +16,7 @@ import { initialState, reducer } from './reducer';
|
|
|
15
16
|
const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
16
17
|
const { push } = useHistory();
|
|
17
18
|
const { changeLocale } = useLocalesProvider();
|
|
19
|
+
const { setSkipped } = useGuidedTour();
|
|
18
20
|
const {
|
|
19
21
|
params: { authType },
|
|
20
22
|
} = useRouteMatch('/auth/:authType');
|
|
@@ -176,6 +178,18 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
176
178
|
// Redirect to the homePage
|
|
177
179
|
setSubmitting(false);
|
|
178
180
|
setHasAdmin(true);
|
|
181
|
+
|
|
182
|
+
const { roles } = user;
|
|
183
|
+
|
|
184
|
+
if (roles) {
|
|
185
|
+
const isUserSuperAdmin = roles.find(({ code }) => code === 'strapi-super-admin');
|
|
186
|
+
|
|
187
|
+
if (isUserSuperAdmin) {
|
|
188
|
+
persistStateToLocaleStorage.setSkipped(false);
|
|
189
|
+
setSkipped(false);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
179
193
|
push('/');
|
|
180
194
|
} catch (err) {
|
|
181
195
|
if (err.response) {
|
|
@@ -8,13 +8,15 @@ import { FormattedMessage } from 'react-intl';
|
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { Helmet } from 'react-helmet';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
|
-
import { LoadingIndicatorPage } from '@strapi/helper-plugin';
|
|
11
|
+
import { LoadingIndicatorPage, useGuidedTour } from '@strapi/helper-plugin';
|
|
12
12
|
import { Layout } from '@strapi/design-system/Layout';
|
|
13
13
|
import { Main } from '@strapi/design-system/Main';
|
|
14
14
|
import { Box } from '@strapi/design-system/Box';
|
|
15
15
|
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
|
16
16
|
import Logo from '../../assets/images/homepage-logo.png';
|
|
17
17
|
import { useModels } from '../../hooks';
|
|
18
|
+
import isGuidedTourCompleted from '../../components/GuidedTour/utils/isGuidedTourCompleted';
|
|
19
|
+
import GuidedTourHomepage from '../../components/GuidedTour/Homepage';
|
|
18
20
|
import SocialLinks from './SocialLinks';
|
|
19
21
|
import HomeHeader from './HomeHeader';
|
|
20
22
|
import ContentBlocks from './ContentBlocks';
|
|
@@ -31,6 +33,10 @@ const LogoContainer = styled(Box)`
|
|
|
31
33
|
const HomePage = () => {
|
|
32
34
|
// // Temporary until we develop the menu API
|
|
33
35
|
const { collectionTypes, singleTypes, isLoading: isLoadingForModels } = useModels();
|
|
36
|
+
const { guidedTourState, isGuidedTourVisible, isSkipped } = useGuidedTour();
|
|
37
|
+
|
|
38
|
+
const showGuidedTour =
|
|
39
|
+
!isGuidedTourCompleted(guidedTourState) && isGuidedTourVisible && !isSkipped;
|
|
34
40
|
|
|
35
41
|
const { push } = useHistory();
|
|
36
42
|
const handleClick = e => {
|
|
@@ -71,7 +77,7 @@ const HomePage = () => {
|
|
|
71
77
|
</Grid>
|
|
72
78
|
<Grid gap={6}>
|
|
73
79
|
<GridItem col={8} s={12}>
|
|
74
|
-
<ContentBlocks />
|
|
80
|
+
{showGuidedTour ? <GuidedTourHomepage /> : <ContentBlocks />}
|
|
75
81
|
</GridItem>
|
|
76
82
|
<GridItem col={4} s={12}>
|
|
77
83
|
<SocialLinks />
|
package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ContentBox/index.js
CHANGED
|
@@ -20,7 +20,7 @@ const HeaderContentBox = ({ apiToken }) => {
|
|
|
20
20
|
<span style={{ alignSelf: 'start' }}>
|
|
21
21
|
<CopyToClipboard
|
|
22
22
|
onCopy={() => {
|
|
23
|
-
trackUsageRef('didCopyTokenKey');
|
|
23
|
+
trackUsageRef.current('didCopyTokenKey');
|
|
24
24
|
toggleNotification({
|
|
25
25
|
type: 'success',
|
|
26
26
|
message: { id: 'Settings.apiTokens.notification.copied' },
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
useOverlayBlocker,
|
|
8
8
|
useNotification,
|
|
9
9
|
useTracking,
|
|
10
|
+
useGuidedTour,
|
|
10
11
|
} from '@strapi/helper-plugin';
|
|
11
12
|
import { HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
|
|
12
13
|
import { Main } from '@strapi/design-system/Main';
|
|
@@ -40,6 +41,7 @@ const ApiTokenCreateView = () => {
|
|
|
40
41
|
const history = useHistory();
|
|
41
42
|
const { trackUsage } = useTracking();
|
|
42
43
|
const trackUsageRef = useRef(trackUsage);
|
|
44
|
+
const { setCurrentStep } = useGuidedTour();
|
|
43
45
|
|
|
44
46
|
const {
|
|
45
47
|
params: { id },
|
|
@@ -103,6 +105,7 @@ const ApiTokenCreateView = () => {
|
|
|
103
105
|
|
|
104
106
|
if (isCreating) {
|
|
105
107
|
history.replace(`/settings/api-tokens/${response.id}`, { apiToken: response });
|
|
108
|
+
setCurrentStep('apiTokens.success');
|
|
106
109
|
}
|
|
107
110
|
} catch (err) {
|
|
108
111
|
const errors = formatAPIErrors(err.response.data);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import {
|
|
4
4
|
SettingsPageTitle,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
NoContent,
|
|
10
10
|
DynamicTable,
|
|
11
11
|
useTracking,
|
|
12
|
+
useGuidedTour,
|
|
12
13
|
} from '@strapi/helper-plugin';
|
|
13
14
|
import { HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
|
|
14
15
|
import { Main } from '@strapi/design-system/Main';
|
|
@@ -33,6 +34,14 @@ const ApiTokenListView = () => {
|
|
|
33
34
|
} = useRBAC(adminPermissions.settings['api-tokens']);
|
|
34
35
|
const { push } = useHistory();
|
|
35
36
|
const { trackUsage } = useTracking();
|
|
37
|
+
const { startSection } = useGuidedTour();
|
|
38
|
+
const startSectionRef = useRef(startSection);
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (startSectionRef.current) {
|
|
42
|
+
startSectionRef.current('apiTokens');
|
|
43
|
+
}
|
|
44
|
+
}, []);
|
|
36
45
|
|
|
37
46
|
useEffect(() => {
|
|
38
47
|
push({ search: qs.stringify({ sort: 'name:ASC' }, { encode: false }) });
|
|
@@ -13,8 +13,8 @@ const RoleRow = ({ id, name, description, usersCount, icons }) => {
|
|
|
13
13
|
|
|
14
14
|
const usersCountText = formatMessage(
|
|
15
15
|
{
|
|
16
|
-
id: `Roles.RoleRow.user-count
|
|
17
|
-
defaultMessage: '{number} user',
|
|
16
|
+
id: `Roles.RoleRow.user-count`,
|
|
17
|
+
defaultMessage: '{number, plural, =0 {# user} one {# user} other {# users}}',
|
|
18
18
|
},
|
|
19
19
|
{ number: usersCount }
|
|
20
20
|
);
|
|
@@ -60,8 +60,6 @@
|
|
|
60
60
|
"app.components.InputFileDetails.remove": "حذف هذا الملف",
|
|
61
61
|
"app.components.InputFileDetails.size": "الحجم:",
|
|
62
62
|
"app.components.InstallPluginPage.description": "قم بتوسيع التطبيق الخاص بك دون عناء.",
|
|
63
|
-
"app.components.InstallPluginPage.helmet": "السوق - الإضافات",
|
|
64
|
-
"app.components.InstallPluginPage.title": "السوق - الإضافات",
|
|
65
63
|
"app.components.LeftMenuFooter.poweredBy": "مندعوم من ",
|
|
66
64
|
"app.components.LeftMenuLinkContainer.configuration": "التهيئة",
|
|
67
65
|
"app.components.LeftMenuLinkContainer.general": "عام",
|
|
@@ -84,8 +82,6 @@
|
|
|
84
82
|
"app.components.PluginCard.more-details": "المزيد من التفاصيل",
|
|
85
83
|
"app.components.listPlugins.button": "إضافة إضافة جديدة",
|
|
86
84
|
"app.components.listPlugins.title.none": "لا يوجد اي إضافات مثبته",
|
|
87
|
-
"app.components.listPlugins.title.plural": "{number} إضافات مثبته",
|
|
88
|
-
"app.components.listPlugins.title.singular": "{number} إضافة مثبته",
|
|
89
85
|
"app.components.listPluginsPage.deletePlugin.error": "حدث خطأ أثناء إلغاء تثبيت الإضافة",
|
|
90
86
|
"app.utils.SelectOption.defaultMessage": " ",
|
|
91
87
|
"app.utils.defaultMessage": " ",
|
|
@@ -74,8 +74,6 @@
|
|
|
74
74
|
"app.components.InstallPluginPage.Download.description": "Může to trvat několik sekund, než se stáhne a nainstaluje zásuvný modul.",
|
|
75
75
|
"app.components.InstallPluginPage.Download.title": "Stahování...",
|
|
76
76
|
"app.components.InstallPluginPage.description": "Rozšiřte snadno svou aplikaci.",
|
|
77
|
-
"app.components.InstallPluginPage.helmet": "Tržiště – Zásuvné moduly",
|
|
78
|
-
"app.components.InstallPluginPage.title": "Tržiště – Zásuvné moduly",
|
|
79
77
|
"app.components.LeftMenuFooter.documentation": "Dokumentace",
|
|
80
78
|
"app.components.LeftMenuFooter.help": "Nápověda",
|
|
81
79
|
"app.components.LeftMenuFooter.poweredBy": "Běží na ",
|
|
@@ -106,8 +104,6 @@
|
|
|
106
104
|
"app.components.PluginCard.more-details": "Více podrobností",
|
|
107
105
|
"app.components.listPlugins.button": "Přidat nový zásuvný modul",
|
|
108
106
|
"app.components.listPlugins.title.none": "Nejsou instalovány žádné zásuvné moduly",
|
|
109
|
-
"app.components.listPlugins.title.plural": "{number} zásuvných modulů je instalováno",
|
|
110
|
-
"app.components.listPlugins.title.singular": "{number} zásuvný modul je nainstalován",
|
|
111
107
|
"app.components.listPluginsPage.deletePlugin.error": "Došlo k chybě při odinstalaci zásuvného modulu",
|
|
112
108
|
"app.containers.App.notification.error.init": "Při provádění požadavku na API došlo k chybě",
|
|
113
109
|
"app.links.configure-view": "Upravit vzhled",
|
|
@@ -198,8 +194,6 @@
|
|
|
198
194
|
"content-manager.containers.Edit.seeDetails": "Detaily",
|
|
199
195
|
"content-manager.containers.Edit.submit": "Uložit",
|
|
200
196
|
"content-manager.containers.EditSettingsView.modal-form.edit-field": "Upravit pole",
|
|
201
|
-
"content-manager.containers.EditView.components.missing.plural": "Chybějící komponenty: {count}",
|
|
202
|
-
"content-manager.containers.EditView.components.missing.singular": "Chybějící komponenty: {count}",
|
|
203
197
|
"content-manager.containers.EditView.notification.errors": "Formulář obsahuje chyby",
|
|
204
198
|
"content-manager.containers.Home.introduction": "K úpravě vašich záznamů prosím přistupte skrz odkaz v levém menu. Tento zásuvný modul neobsahuje způsob jak upravit nastavení, stále na něm pracujeme.",
|
|
205
199
|
"content-manager.containers.Home.pluginHeaderDescription": "Spravujte své záznamy mocným a intuitivním rozhraním.",
|
|
@@ -63,8 +63,6 @@
|
|
|
63
63
|
"Roles & Permissions": "Rollen & Berechtigungen",
|
|
64
64
|
"Roles.ListPage.notification.delete-all-not-allowed": "Manche Rollen konnten nicht gelöscht werden, da sie mit Benutzern verknüpft sind",
|
|
65
65
|
"Roles.ListPage.notification.delete-not-allowed": "Eine Rolle, die mit einem Benutzer verknüpft ist, kann nicht gelöscht werden",
|
|
66
|
-
"Roles.RoleRow.user-count.plural": "{number} Benutzer",
|
|
67
|
-
"Roles.RoleRow.user-count.singular": "{number} Benutzer",
|
|
68
66
|
"Roles.components.List.empty.withSearch": "Es gibt keine Rolle die der Suche ({search}) entspricht...",
|
|
69
67
|
"Settings.PageTitle": "Einstellungen - {name}",
|
|
70
68
|
"Settings.application.description": "Projektdetails ansehen",
|
|
@@ -87,8 +85,6 @@
|
|
|
87
85
|
"Settings.permissions.conditions.no-actions": "Keine Aktionen",
|
|
88
86
|
"Settings.permissions.conditions.none-selected": "Jederzeit",
|
|
89
87
|
"Settings.permissions.conditions.or": "ODER",
|
|
90
|
-
"Settings.permissions.conditions.selected.plural": "{number} Bedingungen ausgewählt",
|
|
91
|
-
"Settings.permissions.conditions.selected.singular": "{number} Bedingung ausgewählt",
|
|
92
88
|
"Settings.permissions.conditions.when": "Wenn",
|
|
93
89
|
"Settings.permissions.menu.link.roles.label": "Rollen",
|
|
94
90
|
"Settings.permissions.menu.link.users.label": "Benutzer",
|
|
@@ -123,8 +119,6 @@
|
|
|
123
119
|
"Settings.roles.form.title": "Details",
|
|
124
120
|
"Settings.roles.list.button.add": "Neue Rolle hinzufügen",
|
|
125
121
|
"Settings.roles.list.description": "Liste der Rollen",
|
|
126
|
-
"Settings.roles.list.title.plural": "{number} Rollen",
|
|
127
|
-
"Settings.roles.list.title.singular": "{number} Rolle",
|
|
128
122
|
"Settings.roles.title": "Rollen",
|
|
129
123
|
"Settings.roles.title.singular": "Rolle",
|
|
130
124
|
"Settings.sso.description": "Einstellungen des Single Sign-On Features konfigurieren.",
|
|
@@ -197,8 +191,6 @@
|
|
|
197
191
|
"app.components.InstallPluginPage.Download.description": "Es kann einige Sekunden dauern, bis das Plugin heruntergeladen und installiert ist.",
|
|
198
192
|
"app.components.InstallPluginPage.Download.title": "Herunterladen...",
|
|
199
193
|
"app.components.InstallPluginPage.description": "Erweitere deine App problemlos.",
|
|
200
|
-
"app.components.InstallPluginPage.helmet": "Marktplatz - Plugins",
|
|
201
|
-
"app.components.InstallPluginPage.title": "Marktplatz - Plugins",
|
|
202
194
|
"app.components.LeftMenuFooter.documentation": "Dokumentation",
|
|
203
195
|
"app.components.LeftMenuFooter.help": "Hilfe",
|
|
204
196
|
"app.components.LeftMenuFooter.poweredBy": "Stolz präsentiert von ",
|
|
@@ -255,8 +247,6 @@
|
|
|
255
247
|
"app.components.Users.SortPicker.sortby.username_desc": "Benutzername (Z nach A)",
|
|
256
248
|
"app.components.listPlugins.button": "Neues Plugin hinzufügen",
|
|
257
249
|
"app.components.listPlugins.title.none": "Es ist kein Plugin installiert",
|
|
258
|
-
"app.components.listPlugins.title.plural": "{number} Plugins sind installiert",
|
|
259
|
-
"app.components.listPlugins.title.singular": "{number} Plugin ist installiert",
|
|
260
250
|
"app.components.listPluginsPage.deletePlugin.error": "Beim Entfernen des Plugins ist ein Fehler aufgetreten",
|
|
261
251
|
"app.containers.App.notification.error.init": "Beim Aufruf der API ist ein Fehler aufgetreten.",
|
|
262
252
|
"app.containers.AuthPage.ForgotPasswordSuccess.text.contact-admin": "Bitte den Administrator kontaktieren, sollte der Link nicht ankommen.",
|
|
@@ -387,8 +377,6 @@
|
|
|
387
377
|
"content-manager.containers.Edit.seeDetails": "Details",
|
|
388
378
|
"content-manager.containers.Edit.submit": "Speichern",
|
|
389
379
|
"content-manager.containers.EditSettingsView.modal-form.edit-field": "Feld bearbeiten",
|
|
390
|
-
"content-manager.containers.EditView.components.missing.plural": "Es fehlen {count} Komponenten",
|
|
391
|
-
"content-manager.containers.EditView.components.missing.singular": "Es fehlt {count} Komponente",
|
|
392
380
|
"content-manager.containers.EditView.notification.errors": "Das Formular enthält Fehler",
|
|
393
381
|
"content-manager.containers.Home.introduction": "Um deine Einträge zu verwalten, klicke auf den entsprechenden Link im Menü links. Dieses Plugin ist noch in aktiver Entwicklung und seine Einstellungen können nicht optimal angepasst werden.",
|
|
394
382
|
"content-manager.containers.Home.pluginHeaderDescription": "Verwalte deine Einträge mithilfe eines mächtigen und wunderschönen Interfaces.",
|