1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 17:33:18 +00:00

fix warning

This commit is contained in:
ilearnit
2018-12-21 06:25:15 +00:00
parent e035f2a381
commit afc16b3f5d
4 changed files with 60 additions and 48 deletions

View File

@@ -1,10 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from '@reach/router';
import { Button, Modal, Input, ModalBody, Form, FormGroup, Label } from 'reactstrap';
import { Button, Modal, Input, ModalBody, Form, FormGroup } from 'reactstrap';
import { gettext, siteRoot } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
const propTypes = {
repoID: PropTypes.string.isRequired,
onLibDecryptDialog: PropTypes.string.isRequired
};
class LibDecryptDialog extends React.Component {
constructor(props) {
@@ -24,7 +28,8 @@ class LibDecryptDialog extends React.Component {
this.setState({
showError: true
});
})
});
e.preventDefault();
}
@@ -70,4 +75,6 @@ class LibDecryptDialog extends React.Component {
}
}
LibDecryptDialog.propTypes = propTypes;
export default LibDecryptDialog;

View File

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import AsyncSelect from 'react-select/lib/Async';
import toaster from '../toast';
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';
const propTypes = {
@@ -58,10 +58,10 @@ class TransferDialog extends React.Component {
this.props.submit(repoID);
this.props.toggleDialog();
}).catch(res => {
let message = gettext('Failed. Please check the network.')
let message = gettext('Failed. Please check the network.');
this.props.toggleDialog();
toaster.danger(message);
})
});
}
render() {

View File

@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import MarkdownViewer from '@seafile/seafile-editor/dist/viewer/markdown-viewer';
import { Tooltip } from 'reactstrap';
const gettext = window.gettext;
@@ -11,7 +10,13 @@ const viewerPropTypes = {
latestContributor: PropTypes.string,
markdownContent: PropTypes.string,
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';