diff --git a/frontend/src/components/dialog/org-add-admin-dialog.js b/frontend/src/components/dialog/org-add-admin-dialog.js
index d5b820e951..55d94ce3fd 100644
--- a/frontend/src/components/dialog/org-add-admin-dialog.js
+++ b/frontend/src/components/dialog/org-add-admin-dialog.js
@@ -26,7 +26,7 @@ class AddOrgAdminDialog extends React.Component {
addOrgAdmin = () => {
if (this.state.selectedOption) {
let userEmail = this.state.selectedOption.email;
- this.props.addOrgAdmin(userEmail)
+ this.props.addOrgAdmin(userEmail);
}
}
diff --git a/frontend/src/components/dialog/related-file-dialogs.js b/frontend/src/components/dialog/related-file-dialogs.js
index 9503a34fb5..684f0ca7e2 100644
--- a/frontend/src/components/dialog/related-file-dialogs.js
+++ b/frontend/src/components/dialog/related-file-dialogs.js
@@ -62,10 +62,10 @@ class RelatedFileDialogs extends React.Component {
}
- )
+ );
}
}
RelatedFileDialogs.propTypes = propTypes;
-export default RelatedFileDialogs
\ No newline at end of file
+export default RelatedFileDialogs;
\ No newline at end of file
diff --git a/frontend/src/components/toolbar/view-file-toolbar.js b/frontend/src/components/toolbar/view-file-toolbar.js
index 9483552e7c..8efad4b5e3 100644
--- a/frontend/src/components/toolbar/view-file-toolbar.js
+++ b/frontend/src/components/toolbar/view-file-toolbar.js
@@ -81,7 +81,7 @@ class ViewFileToolbar extends React.Component {
this.setState({
isRelatedFileDialogShow: false,
showRelatedFileDialog: false,
- })
+ });
}
render() {
diff --git a/frontend/src/draft.js b/frontend/src/draft.js
index 9e9ca89ae9..6feaf52800 100644
--- a/frontend/src/draft.js
+++ b/frontend/src/draft.js
@@ -171,7 +171,7 @@ class Draft extends React.Component {
});
}));
break;
- }
+ }
}
onHistoryItemClick = (currentItem, preItem, activeItem) => {
@@ -713,7 +713,7 @@ class Draft extends React.Component {
if (!draftFileExists) {
return (
);
}
@@ -768,12 +768,12 @@ class Draft extends React.Component {
diff --git a/frontend/src/markdown-editor.js b/frontend/src/markdown-editor.js
index 060df94de3..1eb52ae026 100644
--- a/frontend/src/markdown-editor.js
+++ b/frontend/src/markdown-editor.js
@@ -470,20 +470,20 @@ class MarkdownEditor extends React.Component {
switch(option)
{
case 'related_files':
- if (this.state.relatedFiles.length > 0) {
- this.setState({
- showRelatedFileDialog: true,
- showMarkdownEditorDialog: true,
- viewMode: 'list_related_file',
- });
- }
- else {
- this.setState({
- showRelatedFileDialog: true,
- showMarkdownEditorDialog: true,
- viewMode: 'add_related_file',
- });
- }
+ if (this.state.relatedFiles.length > 0) {
+ this.setState({
+ showRelatedFileDialog: true,
+ showMarkdownEditorDialog: true,
+ viewMode: 'list_related_file',
+ });
+ }
+ else {
+ this.setState({
+ showRelatedFileDialog: true,
+ showMarkdownEditorDialog: true,
+ viewMode: 'add_related_file',
+ });
+ }
break;
case 'tags':
this.setState({
@@ -515,11 +515,12 @@ class MarkdownEditor extends React.Component {
}
componentWillUnmount() {
+
this.socket.emit('repo_update', {
request: 'unwatch_update',
- repo_id: this.props.c.repoID,
+ repo_id: editorUtilities.repoID,
user: {
- name: editorUtilities.name,
+ name: editorUtilities.name,
username: editorUtilities.username,
contact_email: editorUtilities.contact_email,
},
@@ -579,7 +580,7 @@ class MarkdownEditor extends React.Component {
request: 'watch_update',
repo_id: editorUtilities.repoID,
user: {
- name: editorUtilities.name,
+ name: editorUtilities.name,
username: editorUtilities.username,
contact_email: editorUtilities.contact_email,
},
@@ -676,8 +677,8 @@ class MarkdownEditor extends React.Component {
});
}, 3000);
that.timer = null;
- }, 60000);
- }
+ }, 60000);
+ }
}
backToParentDirectory = () => {
@@ -964,8 +965,8 @@ class MarkdownEditor extends React.Component {
render() {
let component;
let sidePanel = this.state.isShowHistory ? true : false;
- let markdownViewer = sidePanel ? "seafile-md-viewer-slate side-panel-on" :
- (this.state.isShowComments ? "seafile-md-viewer-slate comment-on" : "seafile-md-viewer-slate");
+ let markdownViewer = sidePanel ? 'seafile-md-viewer-slate side-panel-on' :
+ (this.state.isShowComments ? 'seafile-md-viewer-slate comment-on' : 'seafile-md-viewer-slate');
if (this.state.loading) {
return (
@@ -997,7 +998,7 @@ class MarkdownEditor extends React.Component {
toggleHistory={this.toggleHistory}
/>
-
+
{
this.state.isShowHistory ?
@@ -1018,8 +1019,8 @@ class MarkdownEditor extends React.Component {
siteRoot={siteRoot}
value={this.state.value}
/>
- {this.state.isShowComments &&
- }
+ {this.state.isShowComments &&
+ }
}
{
@@ -1074,12 +1075,12 @@ class MarkdownEditor extends React.Component {
fileTagList={this.state.fileTagList}
deleteDraft={this.deleteDraft}
showDraftSaved={this.state.showDraftSaved}
- />
+ />;
}
return (
- {this.state.localDraftDialog?
+ {this.state.localDraftDialog ?