diff --git a/examples/getstarted/src/components/basic/simple.json b/examples/getstarted/src/components/basic/simple.json index 91ce6c9e4d..d8f4c8b426 100644 --- a/examples/getstarted/src/components/basic/simple.json +++ b/examples/getstarted/src/components/basic/simple.json @@ -1,7 +1,7 @@ { "collectionName": "components_basic_simples", "info": { - "name": "simple", + "displayName": "simple", "icon": "ambulance", "description": "" }, diff --git a/examples/getstarted/src/components/blog/test-como.json b/examples/getstarted/src/components/blog/test-como.json index 28cf32dde4..8d48e885f8 100644 --- a/examples/getstarted/src/components/blog/test-como.json +++ b/examples/getstarted/src/components/blog/test-como.json @@ -1,7 +1,7 @@ { "collectionName": "components_blog_test_comos", "info": { - "name": "test comp", + "displayName": "test comp", "icon": "air-freshener", "description": "" }, diff --git a/examples/getstarted/src/components/default/apple.json b/examples/getstarted/src/components/default/apple.json index 65d73e7fa6..9c177c7ddc 100644 --- a/examples/getstarted/src/components/default/apple.json +++ b/examples/getstarted/src/components/default/apple.json @@ -1,7 +1,7 @@ { "collectionName": "components_default_apples", "info": { - "name": "apple", + "displayName": "apple", "icon": "apple-alt", "description": "" }, diff --git a/examples/getstarted/src/components/default/car.json b/examples/getstarted/src/components/default/car.json index 6fd2e62cbd..7b01917204 100644 --- a/examples/getstarted/src/components/default/car.json +++ b/examples/getstarted/src/components/default/car.json @@ -1,7 +1,7 @@ { "collectionName": "components_default_cars", "info": { - "name": "car", + "displayName": "car", "icon": "align-right" }, "options": {}, diff --git a/examples/getstarted/src/components/default/closingperiod.json b/examples/getstarted/src/components/default/closingperiod.json index 40c69c850c..d24b5624d0 100644 --- a/examples/getstarted/src/components/default/closingperiod.json +++ b/examples/getstarted/src/components/default/closingperiod.json @@ -1,7 +1,7 @@ { "collectionName": "components_closingperiods", "info": { - "name": "closingperiod", + "displayName": "closingperiod", "description": "", "icon": "angry" }, diff --git a/examples/getstarted/src/components/default/dish.json b/examples/getstarted/src/components/default/dish.json index ad890995da..b0afbb0ea1 100644 --- a/examples/getstarted/src/components/default/dish.json +++ b/examples/getstarted/src/components/default/dish.json @@ -1,7 +1,7 @@ { "collectionName": "components_dishes", "info": { - "name": "dish", + "displayName": "dish", "description": "", "icon": "address-book" }, diff --git a/examples/getstarted/src/components/default/openingtimes.json b/examples/getstarted/src/components/default/openingtimes.json index 9d38e81ac0..eda99bee9b 100644 --- a/examples/getstarted/src/components/default/openingtimes.json +++ b/examples/getstarted/src/components/default/openingtimes.json @@ -1,7 +1,7 @@ { "collectionName": "components_openingtimes", "info": { - "name": "openingtimes", + "displayName": "openingtimes", "description": "", "icon": "calendar" }, diff --git a/examples/getstarted/src/components/default/restaurantservice.json b/examples/getstarted/src/components/default/restaurantservice.json index 8ca52c5a0f..8c79e16c2b 100644 --- a/examples/getstarted/src/components/default/restaurantservice.json +++ b/examples/getstarted/src/components/default/restaurantservice.json @@ -1,7 +1,7 @@ { "collectionName": "components_restaurantservices", "info": { - "name": "restaurantservice", + "displayName": "restaurantservice", "description": "", "icon": "cannabis" }, diff --git a/examples/getstarted/src/components/default/temp.json b/examples/getstarted/src/components/default/temp.json index 0adcf8c24b..6fcb76cb15 100644 --- a/examples/getstarted/src/components/default/temp.json +++ b/examples/getstarted/src/components/default/temp.json @@ -1,7 +1,7 @@ { "collectionName": "components_default_temps", "info": { - "name": "temp", + "displayName": "temp", "icon": "adjust", "description": "" }, diff --git a/examples/getstarted/src/middlewares/test-middleware.js b/examples/getstarted/src/middlewares/test-middleware.js index 48623eb33b..a4e8aecf8c 100644 --- a/examples/getstarted/src/middlewares/test-middleware.js +++ b/examples/getstarted/src/middlewares/test-middleware.js @@ -1,3 +1,14 @@ -module.exports = () => { - return (ctx, next) => next(); +'use strict'; + +/** + * `test-middleware` middleware. + */ + +module.exports = (config, { strapi }) => { + // Add your own logic here. + return async (ctx, next) => { + strapi.log.info('In test-middleware middleware.'); + + await next(); + }; }; diff --git a/packages/cli/create-strapi-app/utils/prompt-user.js b/packages/cli/create-strapi-app/utils/prompt-user.js index 60014e819a..9e8d2f4b62 100644 --- a/packages/cli/create-strapi-app/utils/prompt-user.js +++ b/packages/cli/create-strapi-app/utils/prompt-user.js @@ -57,11 +57,11 @@ async function getTemplateQuestion() { } /** - * + * @param {string|null} projectName - The name of the project + * @param {string|null} template - The template the project should use * @returns Array of prompt question objects */ -// TODO: re-enabled once the template have been migrated to V4 -async function getPromptQuestions(projectName /*, template */) { +async function getPromptQuestions(projectName /*, template*/) { return [ { type: 'input', @@ -85,7 +85,7 @@ async function getPromptQuestions(projectName /*, template */) { }, ], }, - // TODO: re-enabled once the template have been migrated to V4 + // TODO: re-enable once we know where to list the official compatible templates // { // type: 'confirm', // name: 'useTemplate', diff --git a/packages/core/admin/admin/src/content-manager/components/ComponentInitializer/index.js b/packages/core/admin/admin/src/content-manager/components/ComponentInitializer/index.js index b474c2710c..ba4f5758f3 100644 --- a/packages/core/admin/admin/src/content-manager/components/ComponentInitializer/index.js +++ b/packages/core/admin/admin/src/content-manager/components/ComponentInitializer/index.js @@ -4,23 +4,18 @@ import styled from 'styled-components'; import { useIntl } from 'react-intl'; import PlusCircle from '@strapi/icons/PlusCircle'; import { Box } from '@strapi/design-system/Box'; -import { BaseButton } from '@strapi/design-system/BaseButton'; import { Stack } from '@strapi/design-system/Stack'; import { Flex } from '@strapi/design-system/Flex'; import { Text } from '@strapi/design-system/Text'; import { pxToRem } from '@strapi/helper-plugin'; import { getTrad } from '../../utils'; -const IconButton = styled(BaseButton)` - border: none; - padding: 0; - background: transparent; - cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')}; +const IconWrapper = styled.span` > svg { width: ${pxToRem(24)}; height: ${pxToRem(24)}; > circle { - fill: ${({ theme }) => theme.colors.primary200}!important; + fill: ${({ theme }) => theme.colors.primary200}; } > path { fill: ${({ theme }) => theme.colors.primary600}; @@ -33,17 +28,21 @@ const ComponentInitializer = ({ isReadOnly, onClick }) => { return ( - + - + diff --git a/packages/core/admin/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js b/packages/core/admin/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js index 5353c1bd65..f501b930e0 100644 --- a/packages/core/admin/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js +++ b/packages/core/admin/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js @@ -26,12 +26,12 @@ const Category = ({ category, components, isOdd, isOpen, onAddComponent, onToggl - {components.map(({ componentUid, info: { label, icon, name } }) => { + {components.map(({ componentUid, info: { displayName, icon } }) => { return ( diff --git a/packages/core/admin/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js b/packages/core/admin/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js index 44d8e6592e..329bbbce21 100644 --- a/packages/core/admin/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +++ b/packages/core/admin/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js @@ -18,7 +18,13 @@ import Image from '@strapi/icons/Picture'; import Link from '@strapi/icons/Link'; import Quote from '@strapi/icons/Quote'; import More from '@strapi/icons/More'; -import { MainButtons, CustomIconButton, MoreButton, IconButtonGroupMargin } from './WysiwygStyles'; +import { + MainButtons, + CustomIconButton, + MoreButton, + IconButtonGroupMargin, + CustomLinkIconButton, +} from './WysiwygStyles'; const WysiwygNav = ({ editorRef, @@ -75,7 +81,7 @@ const WysiwygNav = ({ /> - } /> + } />