@strapi/admin 4.1.1 → 4.2.0-alpha.O
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/StrapiApp.js +40 -42
- package/admin/src/components/AutoReloadOverlayBlockerProvider/Blocker.js +2 -2
- package/admin/src/components/GuidedTour/Homepage/index.js +1 -1
- package/admin/src/components/GuidedTour/Modal/components/Content.js +1 -1
- package/admin/src/components/GuidedTour/Modal/components/Modal.js +2 -2
- package/admin/src/components/LeftMenu/index.js +1 -1
- package/admin/src/components/Notifications/index.js +1 -1
- package/admin/src/components/Providers/index.js +65 -32
- package/admin/src/components/Theme/index.js +11 -12
- package/admin/src/components/ThemeToggleProvider/index.js +66 -0
- package/admin/src/{pages/AuthPage/components/Logo → components/UnauthenticatedLogo}/index.js +1 -1
- package/admin/src/components/UpgradePlanModal/index.js +2 -2
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +4 -4
- package/admin/src/content-manager/components/ComponentInitializer/index.js +1 -1
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDelete/index.js +1 -1
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDeleteAll/index.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/components/Component/index.js +2 -2
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/ComponentCard/index.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/index.js +2 -5
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +1 -6
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +0 -9
- package/admin/src/content-manager/components/FieldComponent/index.js +2 -5
- package/admin/src/content-manager/components/InputJSON/index.js +2 -5
- package/admin/src/content-manager/components/InputUID/index.js +1 -2
- package/admin/src/content-manager/components/NonRepeatableComponent/index.js +1 -1
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js +2 -2
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +4 -7
- package/admin/src/content-manager/components/SelectMany/index.js +2 -2
- package/admin/src/content-manager/components/SelectOne/index.js +1 -1
- package/admin/src/content-manager/components/SelectWrapper/index.js +2 -5
- package/admin/src/content-manager/components/SelectWrapper/utils/getSelectStyles.js +1 -0
- package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +4 -4
- package/admin/src/content-manager/components/Wysiwyg/EditorStylesContainer.js +5 -3
- package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +2 -2
- package/admin/src/content-manager/components/Wysiwyg/index.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFields.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/components/RelationalFields.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/Header/index.js +4 -7
- package/admin/src/content-manager/pages/EditView/Informations/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/index.js +5 -5
- package/admin/src/content-manager/pages/ListSettingsView/components/CardPreview.js +1 -1
- package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +1 -1
- package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +1 -1
- package/admin/src/contexts/ThemeToggle/index.js +5 -0
- package/admin/src/contexts/index.js +1 -0
- package/admin/src/hooks/index.js +1 -0
- package/admin/src/hooks/useSettingsMenu/init.js +2 -2
- package/admin/src/hooks/useThemeToggle/index.js +10 -0
- package/admin/src/pages/Admin/Onboarding/index.js +1 -1
- package/admin/src/pages/App/index.js +2 -0
- package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +2 -2
- package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +1 -1
- package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +2 -2
- package/admin/src/pages/AuthPage/components/Oops/index.js +1 -1
- package/admin/src/pages/AuthPage/components/Register/index.js +224 -223
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +2 -2
- package/admin/src/pages/AuthPage/index.js +20 -17
- package/admin/src/pages/HomePage/ContentBlocks.js +1 -1
- package/admin/src/pages/HomePage/HomeHeader.js +1 -1
- package/admin/src/pages/HomePage/SocialLinks.js +2 -5
- package/admin/src/pages/MarketplacePage/index.js +13 -4
- package/admin/src/pages/ProfilePage/index.js +79 -15
- package/admin/src/pages/ProfilePage/utils/api.js +4 -2
- package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +4 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/Row/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js +4 -4
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +1 -1
- package/admin/src/pages/UseCasePage/index.js +173 -0
- package/admin/src/translations/en.json +15 -2
- package/build/1094.e1db3a1a.chunk.js +1 -0
- package/build/1454.f065d92a.chunk.js +2 -0
- package/build/{5032.ed02a466.chunk.js.LICENSE.txt → 1454.f065d92a.chunk.js.LICENSE.txt} +0 -0
- package/build/1856.a30bd09b.chunk.js +1 -0
- package/build/2481.4eae9408.chunk.js +1 -0
- package/build/{2912.38fb9bd1.chunk.js → 2912.c5f76e65.chunk.js} +1 -1
- package/build/4362.86a4e939.chunk.js +1 -0
- package/build/4715.8a2db02a.chunk.js +1 -0
- package/build/{4800.18e59c83.chunk.js → 4800.f4a1384a.chunk.js} +1 -1
- package/build/497.3fcf6196.chunk.js +1 -0
- package/build/4982.601f6196.chunk.js +1 -0
- package/build/6404.3c2d0a81.chunk.js +1 -0
- package/build/{7841.ef9bcee9.chunk.js → 7841.490dbbf1.chunk.js} +1 -1
- package/build/{8042.9b85175a.chunk.js → 8042.1d66811a.chunk.js} +2 -2
- package/build/{8042.9b85175a.chunk.js.LICENSE.txt → 8042.1d66811a.chunk.js.LICENSE.txt} +0 -0
- package/build/849.17f011e8.chunk.js +1 -0
- package/build/{2736.ee6e45c9.chunk.js → 9260.fa40c7bd.chunk.js} +2 -2
- package/build/{2736.ee6e45c9.chunk.js.LICENSE.txt → 9260.fa40c7bd.chunk.js.LICENSE.txt} +0 -0
- package/build/9853.6ff595fa.chunk.js +1 -0
- package/build/{9988.b4229043.chunk.js → 9988.fe838ba6.chunk.js} +2 -2
- package/build/{9988.b4229043.chunk.js.LICENSE.txt → 9988.fe838ba6.chunk.js.LICENSE.txt} +0 -0
- package/build/Admin-authenticatedApp.a5d2c5fa.chunk.js +1 -0
- package/build/Admin_homePage.d6754c66.chunk.js +1 -0
- package/build/Admin_marketplace.419010d8.chunk.js +1 -0
- package/build/Admin_profilePage.d7192d06.chunk.js +1 -0
- package/build/Admin_settingsPage.a8c7ded5.chunk.js +1 -0
- package/build/admin-edit-roles-page.49b6f01d.chunk.js +1 -0
- package/build/admin-edit-users.381e4a0d.chunk.js +1 -0
- package/build/admin-users.1fda1f27.chunk.js +1 -0
- package/build/{api-tokens-create-page.0981141a.chunk.js → api-tokens-create-page.db17bb39.chunk.js} +1 -1
- package/build/{api-tokens-edit-page.3faf1af1.chunk.js → api-tokens-edit-page.c7299a77.chunk.js} +1 -1
- package/build/content-manager.8412e024.chunk.js +1 -0
- package/build/content-type-builder-translation-en-json.8034dab6.chunk.js +1 -0
- package/build/content-type-builder.cda4ba3c.chunk.js +1 -0
- package/build/{email-settings-page.4338588d.chunk.js → email-settings-page.40ee2bda.chunk.js} +1 -1
- package/build/{en-json.bb614bb0.chunk.js → en-json.b35c285f.chunk.js} +1 -1
- package/build/i18n-settings-page.c4018651.chunk.js +1 -0
- package/build/i18n-translation-de-json.c5c9054f.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/main.3e719c82.js +2 -0
- package/build/{main.fc123ed7.js.LICENSE.txt → main.3e719c82.js.LICENSE.txt} +0 -0
- package/build/runtime~main.66becdbd.js +1 -0
- package/build/{sso-settings-page.c073b6d7.chunk.js → sso-settings-page.121dd0a6.chunk.js} +1 -1
- package/build/{upload-settings.8e7cbc3b.chunk.js → upload-settings.4401f36d.chunk.js} +1 -1
- package/build/{upload.803ab265.chunk.js → upload.5a2dded7.chunk.js} +1 -1
- package/build/{users-advanced-settings-page.7694d3c9.chunk.js → users-advanced-settings-page.8905d8d8.chunk.js} +1 -1
- package/build/users-email-settings-page.5abb9575.chunk.js +1 -0
- package/build/users-permissions-translation-en-json.21b0fd2f.chunk.js +1 -0
- package/build/users-providers-settings-page.368893ed.chunk.js +1 -0
- package/build/users-roles-settings-page.a2f6277a.chunk.js +1 -0
- package/build/webhook-edit-page.d170eda1.chunk.js +1 -0
- package/build/{webhook-list-page.5c8f2a91.chunk.js → webhook-list-page.c21b5a9a.chunk.js} +1 -1
- package/ee/admin/pages/AuthPage/components/Login/index.js +1 -1
- package/ee/admin/pages/AuthPage/components/Providers/index.js +2 -2
- package/ee/admin/pages/SettingsPage/SingleSignOn/index.js +1 -1
- package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +3 -3
- package/index.js +6 -1
- package/package.json +7 -7
- package/server/routes/serve-admin-panel.js +18 -6
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/isValidJSONString.js +0 -15
- package/admin/src/themes/colors.js +0 -51
- package/admin/src/themes/fontWeights.js +0 -8
- package/admin/src/themes/index.js +0 -13
- package/admin/src/themes/sizes.js +0 -31
- package/build/1856.a06395b4.chunk.js +0 -1
- package/build/2481.7d15bd79.chunk.js +0 -1
- package/build/4261.a4e1e93c.chunk.js +0 -1
- package/build/4362.d0c1a04a.chunk.js +0 -1
- package/build/4715.31ca1967.chunk.js +0 -1
- package/build/497.8f30da61.chunk.js +0 -1
- package/build/4982.da4adb38.chunk.js +0 -1
- package/build/5032.ed02a466.chunk.js +0 -2
- package/build/6250.dc6d7a58.chunk.js +0 -1
- package/build/849.9075d399.chunk.js +0 -1
- package/build/9238.bdd93dae.chunk.js +0 -1
- package/build/Admin-authenticatedApp.013e2774.chunk.js +0 -1
- package/build/Admin_homePage.e4779166.chunk.js +0 -1
- package/build/Admin_marketplace.e8654056.chunk.js +0 -1
- package/build/Admin_profilePage.67dd744c.chunk.js +0 -1
- package/build/Admin_settingsPage.2d0d2cca.chunk.js +0 -1
- package/build/admin-edit-roles-page.2d1b6461.chunk.js +0 -1
- package/build/admin-edit-users.e736db15.chunk.js +0 -1
- package/build/admin-users.5f79c031.chunk.js +0 -1
- package/build/content-manager.141d110d.chunk.js +0 -1
- package/build/content-type-builder-translation-en-json.b3d8e9d4.chunk.js +0 -1
- package/build/content-type-builder.f1cef05c.chunk.js +0 -1
- package/build/i18n-settings-page.51e37957.chunk.js +0 -1
- package/build/main.fc123ed7.js +0 -2
- package/build/runtime~main.0866074a.js +0 -1
- package/build/users-email-settings-page.862eb51e.chunk.js +0 -1
- package/build/users-permissions-translation-en-json.1993655e.chunk.js +0 -1
- package/build/users-providers-settings-page.47f97b06.chunk.js +0 -1
- package/build/users-roles-settings-page.b67e2b4d.chunk.js +0 -1
- package/build/webhook-edit-page.adad0a42.chunk.js +0 -1
|
@@ -56,7 +56,7 @@ const MarketPlacePage = () => {
|
|
|
56
56
|
/>
|
|
57
57
|
<ContentLayout>
|
|
58
58
|
<StackCentered
|
|
59
|
-
|
|
59
|
+
spacing={0}
|
|
60
60
|
hasRadius
|
|
61
61
|
background="neutral0"
|
|
62
62
|
shadow="tableShadow"
|
|
@@ -93,14 +93,23 @@ const MarketPlacePage = () => {
|
|
|
93
93
|
})}
|
|
94
94
|
</CenterTypography>
|
|
95
95
|
</Flex>
|
|
96
|
-
<Stack paddingTop={6} horizontal
|
|
97
|
-
<LinkButton
|
|
96
|
+
<Stack paddingTop={6} horizontal spacing={2}>
|
|
97
|
+
<LinkButton
|
|
98
|
+
href="https://market.strapi.io"
|
|
99
|
+
size="L"
|
|
100
|
+
variant="primary"
|
|
101
|
+
endIcon={<ExternalLink />}
|
|
102
|
+
>
|
|
98
103
|
{formatMessage({
|
|
99
104
|
id: 'admin.pages.MarketPlacePage.submit.market.link',
|
|
100
105
|
defaultMessage: 'Visit the web marketplace',
|
|
101
106
|
})}
|
|
102
107
|
</LinkButton>
|
|
103
|
-
<LinkButton
|
|
108
|
+
<LinkButton
|
|
109
|
+
href="https://market.strapi.io/submit-plugin"
|
|
110
|
+
size="L"
|
|
111
|
+
variant="secondary"
|
|
112
|
+
>
|
|
104
113
|
{formatMessage({
|
|
105
114
|
id: 'admin.pages.MarketPlacePage.submit.plugin.link',
|
|
106
115
|
defaultMessage: 'Submit your plugin',
|
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
useNotification,
|
|
10
10
|
useOverlayBlocker,
|
|
11
11
|
auth,
|
|
12
|
+
useTracking,
|
|
12
13
|
} from '@strapi/helper-plugin';
|
|
13
14
|
import { useIntl } from 'react-intl';
|
|
14
15
|
import { Formik } from 'formik';
|
|
16
|
+
import upperFirst from 'lodash/upperFirst';
|
|
15
17
|
import { useQuery, useMutation, useQueryClient } from 'react-query';
|
|
16
18
|
import pick from 'lodash/pick';
|
|
17
|
-
import omit from 'lodash/omit';
|
|
18
19
|
import { Helmet } from 'react-helmet';
|
|
19
20
|
import { Main } from '@strapi/design-system/Main';
|
|
20
21
|
import { Typography } from '@strapi/design-system/Typography';
|
|
@@ -31,10 +32,15 @@ import Eye from '@strapi/icons/Eye';
|
|
|
31
32
|
import EyeStriked from '@strapi/icons/EyeStriked';
|
|
32
33
|
import Check from '@strapi/icons/Check';
|
|
33
34
|
import useLocalesProvider from '../../components/LocalesProvider/useLocalesProvider';
|
|
35
|
+
import { useThemeToggle } from '../../hooks';
|
|
34
36
|
import { fetchUser, putUser } from './utils/api';
|
|
35
37
|
import schema from './utils/schema';
|
|
36
38
|
import { getFullName } from '../../utils';
|
|
37
39
|
|
|
40
|
+
const DocumentationLink = styled.a`
|
|
41
|
+
color: ${({ theme }) => theme.colors.primary600};
|
|
42
|
+
`;
|
|
43
|
+
|
|
38
44
|
const PasswordInput = styled(TextInput)`
|
|
39
45
|
::-ms-reveal {
|
|
40
46
|
display: none;
|
|
@@ -59,9 +65,11 @@ const ProfilePage = () => {
|
|
|
59
65
|
const { setUserDisplayName } = useAppInfos();
|
|
60
66
|
const queryClient = useQueryClient();
|
|
61
67
|
const { formatMessage } = useIntl();
|
|
68
|
+
const { trackUsage } = useTracking();
|
|
62
69
|
const toggleNotification = useNotification();
|
|
63
70
|
const { lockApp, unlockApp } = useOverlayBlocker();
|
|
64
71
|
const { notifyStatus } = useNotifyAT();
|
|
72
|
+
const { currentTheme, themes: allApplicationThemes, onChangeTheme } = useThemeToggle();
|
|
65
73
|
useFocusWhenNavigate();
|
|
66
74
|
|
|
67
75
|
const { status, data } = useQuery('user', () => fetchUser(), {
|
|
@@ -83,14 +91,18 @@ const ProfilePage = () => {
|
|
|
83
91
|
|
|
84
92
|
const isLoading = status !== 'success';
|
|
85
93
|
|
|
86
|
-
const submitMutation = useMutation(body => putUser(
|
|
94
|
+
const submitMutation = useMutation(body => putUser(body), {
|
|
87
95
|
onSuccess: async data => {
|
|
88
96
|
await queryClient.invalidateQueries('user');
|
|
89
97
|
|
|
90
|
-
auth.setUserInfo(
|
|
98
|
+
auth.setUserInfo(
|
|
99
|
+
pick(data, ['email', 'firstname', 'lastname', 'username', 'preferedLanguage'])
|
|
100
|
+
);
|
|
91
101
|
const userDisplayName = data.username || getFullName(data.firstname, data.lastname);
|
|
92
102
|
setUserDisplayName(userDisplayName);
|
|
93
103
|
changeLocale(data.preferedLanguage);
|
|
104
|
+
onChangeTheme(data.currentTheme);
|
|
105
|
+
trackUsage('didChangeMode', { newMode: data.currentTheme });
|
|
94
106
|
|
|
95
107
|
toggleNotification({
|
|
96
108
|
type: 'success',
|
|
@@ -128,9 +140,16 @@ const ProfilePage = () => {
|
|
|
128
140
|
);
|
|
129
141
|
};
|
|
130
142
|
|
|
131
|
-
const fieldsToPick = [
|
|
143
|
+
const fieldsToPick = [
|
|
144
|
+
'currentTheme',
|
|
145
|
+
'email',
|
|
146
|
+
'firstname',
|
|
147
|
+
'lastname',
|
|
148
|
+
'username',
|
|
149
|
+
'preferedLanguage',
|
|
150
|
+
];
|
|
132
151
|
|
|
133
|
-
const initialData = pick(data, fieldsToPick);
|
|
152
|
+
const initialData = pick({ ...data, currentTheme }, fieldsToPick);
|
|
134
153
|
|
|
135
154
|
if (isLoading) {
|
|
136
155
|
return (
|
|
@@ -154,6 +173,10 @@ const ProfilePage = () => {
|
|
|
154
173
|
);
|
|
155
174
|
}
|
|
156
175
|
|
|
176
|
+
const themesToDisplay = Object.keys(allApplicationThemes).filter(
|
|
177
|
+
themeName => allApplicationThemes[themeName]
|
|
178
|
+
);
|
|
179
|
+
|
|
157
180
|
return (
|
|
158
181
|
<Main aria-busy={isSubmittingForm}>
|
|
159
182
|
<Helmet
|
|
@@ -182,7 +205,7 @@ const ProfilePage = () => {
|
|
|
182
205
|
/>
|
|
183
206
|
<Box paddingBottom={10}>
|
|
184
207
|
<ContentLayout>
|
|
185
|
-
<Stack
|
|
208
|
+
<Stack spacing={6}>
|
|
186
209
|
<Box
|
|
187
210
|
background="neutral0"
|
|
188
211
|
hasRadius
|
|
@@ -192,7 +215,7 @@ const ProfilePage = () => {
|
|
|
192
215
|
paddingLeft={7}
|
|
193
216
|
paddingRight={7}
|
|
194
217
|
>
|
|
195
|
-
<Stack
|
|
218
|
+
<Stack spacing={4}>
|
|
196
219
|
<Typography variant="delta" as="h2">
|
|
197
220
|
{formatMessage({
|
|
198
221
|
id: 'Settings.profile.form.section.profile.title',
|
|
@@ -263,7 +286,7 @@ const ProfilePage = () => {
|
|
|
263
286
|
paddingLeft={7}
|
|
264
287
|
paddingRight={7}
|
|
265
288
|
>
|
|
266
|
-
<Stack
|
|
289
|
+
<Stack spacing={4}>
|
|
267
290
|
<Typography variant="delta" as="h2">
|
|
268
291
|
{formatMessage({
|
|
269
292
|
id: 'Settings.profile.form.section.password.title',
|
|
@@ -410,8 +433,8 @@ const ProfilePage = () => {
|
|
|
410
433
|
paddingLeft={7}
|
|
411
434
|
paddingRight={7}
|
|
412
435
|
>
|
|
413
|
-
<Stack
|
|
414
|
-
<Stack
|
|
436
|
+
<Stack spacing={4}>
|
|
437
|
+
<Stack spacing={1}>
|
|
415
438
|
<Typography variant="delta" as="h2">
|
|
416
439
|
{formatMessage({
|
|
417
440
|
id: 'Settings.profile.form.section.experience.title',
|
|
@@ -424,20 +447,20 @@ const ProfilePage = () => {
|
|
|
424
447
|
id:
|
|
425
448
|
'Settings.profile.form.section.experience.interfaceLanguageHelp',
|
|
426
449
|
defaultMessage:
|
|
427
|
-
'
|
|
450
|
+
'Preference changes will apply only to you. More information is available {here}.',
|
|
428
451
|
},
|
|
429
452
|
{
|
|
430
|
-
|
|
431
|
-
<
|
|
453
|
+
here: (
|
|
454
|
+
<DocumentationLink
|
|
432
455
|
target="_blank"
|
|
433
456
|
rel="noopener noreferrer"
|
|
434
457
|
href="https://docs.strapi.io/developer-docs/latest/development/admin-customization.html#locales"
|
|
435
458
|
>
|
|
436
459
|
{formatMessage({
|
|
437
460
|
id: 'Settings.profile.form.section.experience.documentation',
|
|
438
|
-
defaultMessage: '
|
|
461
|
+
defaultMessage: 'here',
|
|
439
462
|
})}
|
|
440
|
-
</
|
|
463
|
+
</DocumentationLink>
|
|
441
464
|
),
|
|
442
465
|
}
|
|
443
466
|
)}
|
|
@@ -487,6 +510,47 @@ const ProfilePage = () => {
|
|
|
487
510
|
})}
|
|
488
511
|
</Select>
|
|
489
512
|
</GridItem>
|
|
513
|
+
<GridItem s={12} col={6}>
|
|
514
|
+
<Select
|
|
515
|
+
label={formatMessage({
|
|
516
|
+
id: 'Settings.profile.form.section.experience.mode.label',
|
|
517
|
+
defaultMessage: 'Interface mode',
|
|
518
|
+
})}
|
|
519
|
+
placeholder={formatMessage({
|
|
520
|
+
id: 'components.Select.placeholder',
|
|
521
|
+
defaultMessage: 'Select',
|
|
522
|
+
})}
|
|
523
|
+
hint={formatMessage({
|
|
524
|
+
id: 'Settings.profile.form.section.experience.mode.hint',
|
|
525
|
+
defaultMessage: 'Displays your interface in the chosen mode.',
|
|
526
|
+
})}
|
|
527
|
+
value={values.currentTheme}
|
|
528
|
+
onChange={e => {
|
|
529
|
+
handleChange({
|
|
530
|
+
target: { name: 'currentTheme', value: e },
|
|
531
|
+
});
|
|
532
|
+
}}
|
|
533
|
+
>
|
|
534
|
+
{themesToDisplay.map(theme => {
|
|
535
|
+
const label = formatMessage(
|
|
536
|
+
{
|
|
537
|
+
id:
|
|
538
|
+
'Settings.profile.form.section.experience.mode.option-label',
|
|
539
|
+
defaultMessage: '{name} mode',
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: upperFirst(theme),
|
|
543
|
+
}
|
|
544
|
+
);
|
|
545
|
+
|
|
546
|
+
return (
|
|
547
|
+
<Option value={theme} key={theme}>
|
|
548
|
+
{label}
|
|
549
|
+
</Option>
|
|
550
|
+
);
|
|
551
|
+
})}
|
|
552
|
+
</Select>
|
|
553
|
+
</GridItem>
|
|
490
554
|
</Grid>
|
|
491
555
|
</Stack>
|
|
492
556
|
</Box>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import omit from 'lodash/omit';
|
|
1
2
|
import { axiosInstance } from '../../../core/utils';
|
|
2
3
|
|
|
3
4
|
const fetchUser = async () => {
|
|
@@ -7,9 +8,10 @@ const fetchUser = async () => {
|
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
const putUser = async body => {
|
|
10
|
-
const
|
|
11
|
+
const dataToSend = omit(body, ['confirmPassword', 'currentTheme']);
|
|
12
|
+
const { data } = await axiosInstance.put('/admin/users/me', dataToSend);
|
|
11
13
|
|
|
12
|
-
return data.data;
|
|
14
|
+
return { ...data.data, currentTheme: body.currentTheme };
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export { fetchUser, putUser };
|
|
@@ -29,7 +29,10 @@ const SettingsNav = ({ menu }) => {
|
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
const label = formatMessage({
|
|
32
|
+
const label = formatMessage({
|
|
33
|
+
id: 'app.components.LeftMenuLinkContainer.settings',
|
|
34
|
+
defaultMessage: 'Settings',
|
|
35
|
+
});
|
|
33
36
|
|
|
34
37
|
return (
|
|
35
38
|
<SubNav ariaLabel={label}>
|
|
@@ -174,7 +174,7 @@ const ApiTokenCreateView = () => {
|
|
|
174
174
|
}
|
|
175
175
|
/>
|
|
176
176
|
<ContentLayout>
|
|
177
|
-
<Stack
|
|
177
|
+
<Stack spacing={6}>
|
|
178
178
|
{Boolean(apiToken?.name) && <HeaderContentBox apiToken={apiToken.accessKey} />}
|
|
179
179
|
<Box
|
|
180
180
|
background="neutral0"
|
|
@@ -185,7 +185,7 @@ const ApiTokenCreateView = () => {
|
|
|
185
185
|
paddingLeft={7}
|
|
186
186
|
paddingRight={7}
|
|
187
187
|
>
|
|
188
|
-
<Stack
|
|
188
|
+
<Stack spacing={4}>
|
|
189
189
|
<Typography variant="delta" as="h2">
|
|
190
190
|
{formatMessage({
|
|
191
191
|
id: 'Settings.apiTokens.details',
|
package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js
CHANGED
|
@@ -89,7 +89,7 @@ const ConditionsModal = ({ actions, headerBreadCrumbs, isFormDisabled, onClosed,
|
|
|
89
89
|
</Breadcrumbs>
|
|
90
90
|
</ModalHeader>
|
|
91
91
|
<Box padding={8}>
|
|
92
|
-
<Stack
|
|
92
|
+
<Stack spacing={6}>
|
|
93
93
|
<Typography variant="beta" as="h2">
|
|
94
94
|
{formatMessage({
|
|
95
95
|
id: 'Settings.permissions.conditions.define-conditions',
|
|
@@ -33,10 +33,10 @@ const GlobalActions = ({ actions, isFormDisabled, kind }) => {
|
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
35
|
<Box paddingBottom={4} paddingTop={6} style={{ paddingLeft: firstRowWidth }}>
|
|
36
|
-
<Stack horizontal
|
|
36
|
+
<Stack horizontal spacing={0}>
|
|
37
37
|
{displayedActions.map(({ label, actionId }) => {
|
|
38
38
|
return (
|
|
39
|
-
<CenteredStack key={actionId}
|
|
39
|
+
<CenteredStack key={actionId} spacing={3}>
|
|
40
40
|
<Typography variant="sigma" textColor="neutral500">
|
|
41
41
|
{formatMessage({
|
|
42
42
|
id: `Settings.roles.form.permissions.${label.toLowerCase()}`,
|
|
@@ -16,7 +16,7 @@ const RoleForm = ({ disabled, role, values, errors, onChange, onBlur }) => {
|
|
|
16
16
|
return (
|
|
17
17
|
<>
|
|
18
18
|
<Box background="neutral0" padding={6} shadow="filterShadow" hasRadius>
|
|
19
|
-
<Stack
|
|
19
|
+
<Stack spacing={4}>
|
|
20
20
|
<Flex justifyContent="space-between">
|
|
21
21
|
<Box>
|
|
22
22
|
<Box>
|
|
@@ -109,7 +109,7 @@ const EditPage = () => {
|
|
|
109
109
|
<>
|
|
110
110
|
<HeaderLayout
|
|
111
111
|
primaryAction={
|
|
112
|
-
<Stack horizontal
|
|
112
|
+
<Stack horizontal spacing={2}>
|
|
113
113
|
<Button
|
|
114
114
|
disabled={role.code === 'strapi-super-admin'}
|
|
115
115
|
onClick={handleSubmit}
|
|
@@ -141,7 +141,7 @@ const EditPage = () => {
|
|
|
141
141
|
}
|
|
142
142
|
/>
|
|
143
143
|
<ContentLayout>
|
|
144
|
-
<Stack
|
|
144
|
+
<Stack spacing={6}>
|
|
145
145
|
<RoleForm
|
|
146
146
|
isLoading={isRoleLoading}
|
|
147
147
|
disabled={isFormDisabled}
|
|
@@ -205,7 +205,7 @@ const EditPage = ({ canUpdate }) => {
|
|
|
205
205
|
<MagicLink registrationToken={data.registrationToken} />
|
|
206
206
|
</Box>
|
|
207
207
|
)}
|
|
208
|
-
<Stack
|
|
208
|
+
<Stack spacing={7}>
|
|
209
209
|
<Box
|
|
210
210
|
background="neutral0"
|
|
211
211
|
hasRadius
|
|
@@ -215,7 +215,7 @@ const EditPage = ({ canUpdate }) => {
|
|
|
215
215
|
paddingLeft={7}
|
|
216
216
|
paddingRight={7}
|
|
217
217
|
>
|
|
218
|
-
<Stack
|
|
218
|
+
<Stack spacing={4}>
|
|
219
219
|
<Typography variant="delta" as="h2">
|
|
220
220
|
{formatMessage({
|
|
221
221
|
id: 'app.components.Users.ModalCreateBody.block-title.details',
|
|
@@ -250,7 +250,7 @@ const EditPage = ({ canUpdate }) => {
|
|
|
250
250
|
paddingLeft={7}
|
|
251
251
|
paddingRight={7}
|
|
252
252
|
>
|
|
253
|
-
<Stack
|
|
253
|
+
<Stack spacing={4}>
|
|
254
254
|
<Typography variant="delta" as="h2">
|
|
255
255
|
{formatMessage({
|
|
256
256
|
id: 'app.components.Users.ModalCreateBody.block-title.login',
|
|
@@ -112,7 +112,7 @@ const ModalForm = ({ queryName, onToggle }) => {
|
|
|
112
112
|
return (
|
|
113
113
|
<Form>
|
|
114
114
|
<ModalBody>
|
|
115
|
-
<Stack
|
|
115
|
+
<Stack spacing={6}>
|
|
116
116
|
{currentStep !== 'create' && <MagicLink registrationToken={registrationToken} />}
|
|
117
117
|
<Box>
|
|
118
118
|
<Typography variant="beta" as="h2">
|
|
@@ -122,7 +122,7 @@ const ModalForm = ({ queryName, onToggle }) => {
|
|
|
122
122
|
})}
|
|
123
123
|
</Typography>
|
|
124
124
|
<Box paddingTop={4}>
|
|
125
|
-
<Stack
|
|
125
|
+
<Stack spacing={1}>
|
|
126
126
|
<Grid gap={5}>
|
|
127
127
|
{layout.map(row => {
|
|
128
128
|
return row.map(input => {
|
package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js
CHANGED
|
@@ -29,7 +29,7 @@ const Status = ({ isPending, statusCode }) => {
|
|
|
29
29
|
|
|
30
30
|
if (isPending) {
|
|
31
31
|
return (
|
|
32
|
-
<Stack horizontal
|
|
32
|
+
<Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
|
|
33
33
|
<Icon as={Loader} />
|
|
34
34
|
<Typography>
|
|
35
35
|
{formatMessage({ id: 'Settings.webhooks.trigger.pending', defaultMessage: 'pending' })}
|
|
@@ -40,7 +40,7 @@ const Status = ({ isPending, statusCode }) => {
|
|
|
40
40
|
|
|
41
41
|
if (statusCode >= 200 && statusCode < 300) {
|
|
42
42
|
return (
|
|
43
|
-
<Stack horizontal
|
|
43
|
+
<Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
|
|
44
44
|
<Icon as={Check} color="success700" />
|
|
45
45
|
<Typography>
|
|
46
46
|
{formatMessage({ id: 'Settings.webhooks.trigger.success', defaultMessage: 'success' })}
|
|
@@ -51,7 +51,7 @@ const Status = ({ isPending, statusCode }) => {
|
|
|
51
51
|
|
|
52
52
|
if (statusCode >= 300) {
|
|
53
53
|
return (
|
|
54
|
-
<Stack horizontal
|
|
54
|
+
<Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
|
|
55
55
|
<Icon as={Cross} color="danger700" />
|
|
56
56
|
<Typography>
|
|
57
57
|
{formatMessage({ id: 'Settings.error', defaultMessage: 'error' })} {statusCode}
|
|
@@ -115,7 +115,7 @@ const CancelButton = ({ onCancel }) => {
|
|
|
115
115
|
return (
|
|
116
116
|
<Flex justifyContent="flex-end">
|
|
117
117
|
<button onClick={onCancel} type="button">
|
|
118
|
-
<Stack horizontal
|
|
118
|
+
<Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
|
|
119
119
|
<Typography textColor="neutral400">
|
|
120
120
|
{formatMessage({ id: 'Settings.webhooks.trigger.cancel', defaultMessage: 'cancel' })}
|
|
121
121
|
</Typography>
|
package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js
CHANGED
|
@@ -50,7 +50,7 @@ const WebhookForm = ({
|
|
|
50
50
|
<Form noValidate>
|
|
51
51
|
<HeaderLayout
|
|
52
52
|
primaryAction={
|
|
53
|
-
<Stack horizontal
|
|
53
|
+
<Stack horizontal spacing={2}>
|
|
54
54
|
<Button
|
|
55
55
|
onClick={() => {
|
|
56
56
|
triggerWebhook();
|
|
@@ -92,7 +92,7 @@ const WebhookForm = ({
|
|
|
92
92
|
}
|
|
93
93
|
/>
|
|
94
94
|
<ContentLayout>
|
|
95
|
-
<Stack
|
|
95
|
+
<Stack spacing={4}>
|
|
96
96
|
{showTriggerResponse && (
|
|
97
97
|
<div className="trigger-wrapper">
|
|
98
98
|
<TriggerContainer
|
|
@@ -103,7 +103,7 @@ const WebhookForm = ({
|
|
|
103
103
|
</div>
|
|
104
104
|
)}
|
|
105
105
|
<Box background="neutral0" padding={8} shadow="filterShadow" hasRadius>
|
|
106
|
-
<Stack
|
|
106
|
+
<Stack spacing={6}>
|
|
107
107
|
<Grid gap={6}>
|
|
108
108
|
<GridItem col={6}>
|
|
109
109
|
<Field
|