mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 02:42:47 +00:00
fix warning
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link } from '@reach/router';
|
import { Button, Modal, Input, ModalBody, Form, FormGroup } from 'reactstrap';
|
||||||
import { Button, Modal, Input, ModalBody, Form, FormGroup, Label } from 'reactstrap';
|
|
||||||
import { gettext, siteRoot } from '../../utils/constants';
|
import { gettext, siteRoot } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
|
|
||||||
|
const propTypes = {
|
||||||
|
repoID: PropTypes.string.isRequired,
|
||||||
|
onLibDecryptDialog: PropTypes.string.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class LibDecryptDialog extends React.Component {
|
class LibDecryptDialog extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -24,7 +28,8 @@ class LibDecryptDialog extends React.Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
showError: true
|
showError: true
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,4 +75,6 @@ class LibDecryptDialog extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LibDecryptDialog.propTypes = propTypes;
|
||||||
|
|
||||||
export default LibDecryptDialog;
|
export default LibDecryptDialog;
|
||||||
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import AsyncSelect from 'react-select/lib/Async';
|
import AsyncSelect from 'react-select/lib/Async';
|
||||||
import toaster from '../toast';
|
import toaster from '../toast';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
import { Button, Modal, ModalHeader, ModalBody } from 'reactstrap';
|
||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -58,10 +58,10 @@ class TransferDialog extends React.Component {
|
|||||||
this.props.submit(repoID);
|
this.props.submit(repoID);
|
||||||
this.props.toggleDialog();
|
this.props.toggleDialog();
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
let message = gettext('Failed. Please check the network.')
|
let message = gettext('Failed. Please check the network.');
|
||||||
this.props.toggleDialog();
|
this.props.toggleDialog();
|
||||||
toaster.danger(message);
|
toaster.danger(message);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import MarkdownViewer from '@seafile/seafile-editor/dist/viewer/markdown-viewer';
|
import MarkdownViewer from '@seafile/seafile-editor/dist/viewer/markdown-viewer';
|
||||||
import { Tooltip } from 'reactstrap';
|
|
||||||
|
|
||||||
const gettext = window.gettext;
|
const gettext = window.gettext;
|
||||||
|
|
||||||
@@ -11,7 +10,13 @@ const viewerPropTypes = {
|
|||||||
latestContributor: PropTypes.string,
|
latestContributor: PropTypes.string,
|
||||||
markdownContent: PropTypes.string,
|
markdownContent: PropTypes.string,
|
||||||
onContentRendered: PropTypes.func.isRequired,
|
onContentRendered: PropTypes.func.isRequired,
|
||||||
activeTitleIndex: PropTypes.number
|
activeTitleIndex: PropTypes.number,
|
||||||
|
onLinkClick: PropTypes.func,
|
||||||
|
reviewStatus: PropTypes.string,
|
||||||
|
goReviewPage: PropTypes.func,
|
||||||
|
isDraft: PropTypes.bool,
|
||||||
|
hasDraft: PropTypes.bool,
|
||||||
|
goDraftPage: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
const contentClass = 'markdown-content';
|
const contentClass = 'markdown-content';
|
||||||
|
Reference in New Issue
Block a user