1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 21:30:39 +00:00

Fix eslint warnings (#5635)

* 01 fix eslint warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings
This commit is contained in:
Michael An
2023-09-13 08:40:50 +08:00
committed by GitHub
parent d829ba5b23
commit 14ce391007
520 changed files with 4774 additions and 3438 deletions

View File

@@ -40,7 +40,7 @@ class AllRepos extends Component {
toggleCreateRepoDialog = () => {
this.setState({isCreateRepoDialogOpen: !this.state.isCreateRepoDialogOpen});
}
};
getReposByPage = (page) => {
const { perPage, sortBy } = this.state;
@@ -56,7 +56,7 @@ class AllRepos extends Component {
errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403
});
});
}
};
sortItems = (sortBy) => {
this.setState({
@@ -72,7 +72,7 @@ class AllRepos extends Component {
navigate(url.toString());
this.getReposByPage(currentPage);
});
}
};
resetPerPage = (perPage) => {
this.setState({
@@ -80,7 +80,7 @@ class AllRepos extends Component {
}, () => {
this.getReposByPage(1);
});
}
};
createRepo = (repoName, Owner) => {
seafileAPI.sysAdminCreateRepo(repoName, Owner).then(res => {
@@ -92,7 +92,7 @@ class AllRepos extends Component {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
});
}
};
onDeleteRepo = (targetRepo) => {
let repos = this.state.repos.filter(repo => {
@@ -101,7 +101,7 @@ class AllRepos extends Component {
this.setState({
repos: repos
});
}
};
onTransferRepo = (targetRepo) => {
let repos = this.state.repos.map((item) => {
@@ -110,18 +110,18 @@ class AllRepos extends Component {
this.setState({
repos: repos
});
}
};
getSearch = () => {
return <Search
placeholder={gettext('Search libraries by name or ID')}
submit={this.searchRepos}
/>;
}
};
searchRepos = (repoNameOrID) => {
navigate(`${siteRoot}sys/search-libraries/?name_or_id=${encodeURIComponent(repoNameOrID)}`);
}
};
render() {
let { isCreateRepoDialogOpen } = this.state;