mirror of
https://github.com/strapi/strapi.git
synced 2025-11-16 18:19:34 +00:00
Fix PR feedback
This commit is contained in:
parent
340f06e053
commit
8be6df24b3
@ -136,7 +136,6 @@ class ImgPreview extends React.Component {
|
|||||||
isPictureType = (fileName) => /\.(jpe?g|png|gif)$/i.test(fileName);
|
isPictureType = (fileName) => /\.(jpe?g|png|gif)$/i.test(fileName);
|
||||||
|
|
||||||
updateFilePosition = (newPosition) => {
|
updateFilePosition = (newPosition) => {
|
||||||
// this.setState({ position: newPosition });
|
|
||||||
this.props.updateFilePosition(newPosition);
|
this.props.updateFilePosition(newPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,19 +23,20 @@
|
|||||||
|
|
||||||
.editor {
|
.editor {
|
||||||
min-height: 303px;
|
min-height: 303px;
|
||||||
padding: 0px 10px 0 10px;
|
padding: 10px 20px 0 20px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
line-height: 18px !important;
|
line-height: 18px !important;
|
||||||
cursor: text;
|
cursor: text;
|
||||||
|
// TODO define rules for header's margin
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 18px !important;
|
line-height: 18px !important;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
margin-top: -3px !important;
|
margin-top: 13px !important;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 22px;
|
||||||
}
|
}
|
||||||
> div {
|
> div {
|
||||||
> div {
|
> div {
|
||||||
@ -50,6 +51,9 @@
|
|||||||
ul, ol {
|
ul, ol {
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
|
span {
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.editorFocus {
|
.editorFocus {
|
||||||
@ -165,7 +169,7 @@
|
|||||||
|
|
||||||
.fullscreenPreviewEditor {
|
.fullscreenPreviewEditor {
|
||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
padding: 0px 8px;
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggleModeButton {
|
.toggleModeButton {
|
||||||
|
|||||||
@ -5,13 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
/* eslint-disable jsx-a11y/label-has-for */
|
|
||||||
// import PropTypes from 'prop-types';
|
|
||||||
|
|
||||||
import styles from './styles.scss';
|
import styles from './styles.scss';
|
||||||
|
|
||||||
|
/* eslint-disable jsx-a11y/label-has-for */
|
||||||
const WysiwygDropUpload = (props) => {
|
const WysiwygDropUpload = (props) => {
|
||||||
// console.log(props);
|
|
||||||
return (
|
return (
|
||||||
<label
|
<label
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@ -171,8 +171,6 @@ export class EditPage extends React.Component {
|
|||||||
this.props.setFormErrors(formErrors);
|
this.props.setFormErrors(formErrors);
|
||||||
}
|
}
|
||||||
|
|
||||||
// layout = bindLayout.call(this, layout);
|
|
||||||
|
|
||||||
componentDidCatch(error, info) {
|
componentDidCatch(error, info) {
|
||||||
console.log('err', error);
|
console.log('err', error);
|
||||||
console.log('info', info);
|
console.log('info', info);
|
||||||
|
|||||||
@ -36,14 +36,13 @@ function* dataGet(action) {
|
|||||||
try {
|
try {
|
||||||
const modelName = yield select(makeSelectModelName());
|
const modelName = yield select(makeSelectModelName());
|
||||||
const params = { source: action.source };
|
const params = { source: action.source };
|
||||||
const response = yield [
|
const [response, layout] = yield [
|
||||||
call(request, `/content-manager/explorer/${modelName}/${action.id}`, { method: 'GET', params }),
|
call(request, `/content-manager/explorer/${modelName}/${action.id}`, { method: 'GET', params }),
|
||||||
call(request, '/content-manager/layout', { method: 'GET', params }),
|
call(request, '/content-manager/layout', { method: 'GET', params }),
|
||||||
];
|
];
|
||||||
|
const pluginHeaderTitle = yield call(templateObject, { mainField: action.mainField }, response);
|
||||||
const pluginHeaderTitle = yield call(templateObject, { mainField: action.mainField }, response[0]);
|
yield put(getDataSucceeded(action.id, response, pluginHeaderTitle.mainField));
|
||||||
yield put(getDataSucceeded(action.id, response[0], pluginHeaderTitle.mainField));
|
yield put(getLayoutSucceeded(layout));
|
||||||
yield put(getLayoutSucceeded(response[1]));
|
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
strapi.notification.error('content-manager.error.record.fetch');
|
strapi.notification.error('content-manager.error.record.fetch');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user