1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

[eslint] updated eslintrc and improved the code (#4702)

This commit is contained in:
llj
2020-11-02 13:56:35 +08:00
committed by GitHub
parent ed3e5fc416
commit 04f29704b3
337 changed files with 1586 additions and 1585 deletions

View File

@@ -58,7 +58,7 @@ class Wiki extends Component {
this.loadWikiData(initialPath);
}
loadWikiData = (initialPath) => {
loadWikiData = (initialPath) => {
this.loadSidePanel(initialPath);
if (isDir === 'None') {
@@ -69,7 +69,7 @@ class Wiki extends Component {
let fileUrl = siteRoot + 'published/' + slug + Utils.encodePath(initialPath);
window.history.pushState({url: fileUrl, path: initialPath}, initialPath, fileUrl);
}
} else if (isDir === 'True') {
} else if (isDir === 'True') {
this.showDir(initialPath);
} else if (isDir === 'False') {
this.showFile(initialPath);
@@ -88,7 +88,7 @@ class Wiki extends Component {
this.loadNodeAndParentsByPath(initialPath);
}
}
}
loadIndexNode = () => {
@@ -121,7 +121,7 @@ class Wiki extends Component {
this.setState({
isDataLoading: true,
isViewFile: true,
path: filePath,
path: filePath,
});
seafileAPI.getWikiFileContent(slug, filePath).then(res => {
@@ -255,9 +255,9 @@ class Wiki extends Component {
}
}
}
onSearchedClick = (item) => {
let path = item.is_dir ? item.path.slice(0, item.path.length - 1) : item.path;
let path = item.is_dir ? item.path.slice(0, item.path.length - 1) : item.path;
if (this.state.currentPath === path) {
return;
}
@@ -270,7 +270,7 @@ class Wiki extends Component {
if (!node) {
index = i;
break;
}
}
}
if (index === -1) { // all the data has been loaded already.
let tree = this.state.treeData.clone();