diff --git a/frontend/src/components/dialog/lib-decrypt-dialog.js b/frontend/src/components/dialog/lib-decrypt-dialog.js
index 0f82b5a9bd..2deec38e95 100644
--- a/frontend/src/components/dialog/lib-decrypt-dialog.js
+++ b/frontend/src/components/dialog/lib-decrypt-dialog.js
@@ -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();
}
@@ -49,25 +54,27 @@ class LibDecryptDialog extends React.Component {
return (
-
-
+
+
);
}
}
+LibDecryptDialog.propTypes = propTypes;
+
export default LibDecryptDialog;
diff --git a/frontend/src/components/dialog/transfer-dialog.js b/frontend/src/components/dialog/transfer-dialog.js
index 763e7b961d..0c64a4c652 100644
--- a/frontend/src/components/dialog/transfer-dialog.js
+++ b/frontend/src/components/dialog/transfer-dialog.js
@@ -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.')
- this.props.toggleDialog();
- toaster.danger(message);
- })
+ let message = gettext('Failed. Please check the network.');
+ this.props.toggleDialog();
+ toaster.danger(message);
+ });
}
render() {
diff --git a/frontend/src/components/draft-list-view/draft-list-item.js b/frontend/src/components/draft-list-view/draft-list-item.js
index eb66d1aebe..b4c3ac9313 100644
--- a/frontend/src/components/draft-list-view/draft-list-item.js
+++ b/frontend/src/components/draft-list-view/draft-list-item.js
@@ -67,8 +67,8 @@ class DraftListItem extends React.Component {
{(draft.review_id && draft.review_status === 'open') ?
- #{draft.review_id} :
- --
+ #{draft.review_id} :
+ --
}
|
{localTime} |
diff --git a/frontend/src/components/markdown-viewer.js b/frontend/src/components/markdown-viewer.js
index 64c68a5ba6..84daba32d7 100644
--- a/frontend/src/components/markdown-viewer.js
+++ b/frontend/src/components/markdown-viewer.js
@@ -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';
@@ -43,31 +48,31 @@ class MarkdownContentViewer extends React.Component {
);
}
return (
-
- {this.props.reviewStatus === 'open' &&
-
-
+
+ {this.props.reviewStatus === 'open' &&
+
+ }
- {(!this.props.isDraft && this.props.hasDraft && this.props.reviewStatus !== 'open') &&
-
-
+ {(!this.props.isDraft && this.props.hasDraft && this.props.reviewStatus !== 'open') &&
+
+ }
-
-
{gettext('Last modified by')} {this.props.latestContributor}, {this.props.lastModified}
-
+
+
{gettext('Last modified by')} {this.props.latestContributor}, {this.props.lastModified}
+
);
}
}