mirror of
https://github.com/strapi/strapi.git
synced 2025-09-22 06:50:51 +00:00
Merge branch 'master' into feature/replace-virtualized-window
This commit is contained in:
commit
4631f9f87b
@ -12,10 +12,12 @@ import isEmpty from 'lodash/isEmpty';
|
||||
import { getTrad } from '../../utils';
|
||||
|
||||
const StyledBullet = styled.div`
|
||||
flex-shrink: 0;
|
||||
width: ${pxToRem(6)};
|
||||
height: ${pxToRem(6)};
|
||||
margin-right: ${({ theme }) => theme.spaces[2]};
|
||||
background: ${({ theme, isDraft }) => theme.colors[isDraft ? 'secondary700' : 'success200']};
|
||||
background-color: ${({ theme, isDraft }) =>
|
||||
theme.colors[isDraft ? 'secondary600' : 'success600']};
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
`;
|
||||
|
@ -5,7 +5,7 @@ import { Stack } from '@strapi/design-system/Stack';
|
||||
import { Typography } from '@strapi/design-system/Typography';
|
||||
import get from 'lodash/get';
|
||||
import isNull from 'lodash/isNull';
|
||||
import Select from 'react-select';
|
||||
import { ReactSelect as Select } from '@strapi/helper-plugin';
|
||||
import SingleValue from './SingleValue';
|
||||
|
||||
function SelectOne({
|
||||
@ -21,7 +21,6 @@ function SelectOne({
|
||||
onMenuScrollToBottom,
|
||||
options,
|
||||
placeholder,
|
||||
styles,
|
||||
value,
|
||||
description,
|
||||
}) {
|
||||
@ -48,7 +47,6 @@ function SelectOne({
|
||||
placeholder={formatMessage(
|
||||
placeholder || { id: 'global.select', defaultMessage: 'Select...' }
|
||||
)}
|
||||
styles={styles}
|
||||
value={isNull(value) ? null : { label: get(value, [mainField.name], ''), value }}
|
||||
/>
|
||||
|
||||
@ -89,7 +87,6 @@ SelectOne.propTypes = {
|
||||
id: PropTypes.string.isRequired,
|
||||
defaultMessage: PropTypes.string.isRequired,
|
||||
}),
|
||||
styles: PropTypes.object.isRequired,
|
||||
value: PropTypes.object,
|
||||
description: PropTypes.string,
|
||||
};
|
||||
|
@ -10,10 +10,12 @@ import { pxToRem } from '@strapi/helper-plugin';
|
||||
import { getTrad } from '../../utils';
|
||||
|
||||
const StyledBullet = styled.div`
|
||||
flex-shrink: 0;
|
||||
width: ${pxToRem(6)};
|
||||
height: ${pxToRem(6)};
|
||||
margin-right: ${({ theme }) => theme.spaces[2]};
|
||||
background: ${({ theme, isDraft }) => theme.colors[isDraft ? 'secondary600' : 'success600']};
|
||||
background-color: ${({ theme, isDraft }) =>
|
||||
theme.colors[isDraft ? 'secondary600' : 'success600']};
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
`;
|
||||
@ -22,10 +24,9 @@ const Option = props => {
|
||||
const { formatMessage } = useIntl();
|
||||
const Component = components.Option;
|
||||
const hasDraftAndPublish = has(get(props, 'data.value'), 'publishedAt');
|
||||
const isDraft = isEmpty(get(props, 'data.value.publishedAt'));
|
||||
|
||||
if (hasDraftAndPublish) {
|
||||
if (hasDraftAndPublish) {
|
||||
const isDraft = isEmpty(get(props, 'data.value.publishedAt'));
|
||||
const draftMessage = {
|
||||
id: getTrad('components.Select.draft-info-title'),
|
||||
defaultMessage: 'State: Draft',
|
||||
@ -45,7 +46,6 @@ const Option = props => {
|
||||
</Component>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return <Component {...props}>{props.label || '-'}</Component>;
|
||||
};
|
||||
|
@ -119,7 +119,6 @@
|
||||
"react-refresh": "0.11.0",
|
||||
"react-router": "5.2.0",
|
||||
"react-router-dom": "5.2.0",
|
||||
"react-select": "^4.0.2",
|
||||
"react-window": "1.8.7",
|
||||
"redux": "^4.0.1",
|
||||
"redux-saga": "^0.16.0",
|
||||
|
3
packages/plugins/graphql/server/bootstrap.js
vendored
3
packages/plugins/graphql/server/bootstrap.js
vendored
@ -110,6 +110,9 @@ module.exports = async ({ strapi }) => {
|
||||
},
|
||||
};
|
||||
|
||||
// allow graphql playground to load without authentication
|
||||
if (ctx.request.method === 'GET') return next();
|
||||
|
||||
return strapi.auth.authenticate(ctx, next);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user