1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +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

@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from '@gatsbyjs/reach-router';
import { Badge } from 'reactstrap';
import { gettext, siteRoot, canAddRepo, canGenerateShareLink, canGenerateUploadLink, canInvitePeople, dtableWebServer, enableOCM, enableOCMViaWebdav } from '../utils/constants';
import { seafileAPI } from '../utils/seafile-api';
import { Utils } from '../utils/utils';
@@ -36,13 +35,13 @@ class MainSideNav extends React.Component {
groupsExtended: !this.state.groupsExtended,
});
this.loadGroups();
}
};
shExtend = () => {
this.setState({
sharedExtended: !this.state.sharedExtended,
});
}
};
loadGroups = () => {
let _this = this;
@@ -62,7 +61,7 @@ class MainSideNav extends React.Component {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
});
}
};
tabItemClick = (e, param, id) => {
if (window.uploader &&
@@ -75,16 +74,16 @@ class MainSideNav extends React.Component {
window.uploader.isUploadProgressDialogShow = false;
}
this.props.tabItemClick(param, id);
}
};
onDTableClick = () => {
let url = dtableWebServer;
window.open(url);
}
};
getActiveClass = (tab) => {
return this.props.currentTab === tab ? 'active' : '';
}
};
renderSharedGroups() {
let style = {height: 0};
@@ -251,12 +250,12 @@ class MainSideNav extends React.Component {
</Link>
</li>
}
<li className="nav-item">
<Link className={`nav-link ellipsis ${this.getActiveClass('published')}`} to={siteRoot + 'published/'} title={gettext('Published Libraries')} onClick={(e) => this.tabItemClick(e, 'published')}>
<span className="sf2-icon-wiki-view" aria-hidden="true"></span>
<span className="nav-text">{gettext('Published Libraries')}</span>
</Link>
</li>
<li className="nav-item">
<Link className={`nav-link ellipsis ${this.getActiveClass('published')}`} to={siteRoot + 'published/'} title={gettext('Published Libraries')} onClick={(e) => this.tabItemClick(e, 'published')}>
<span className="sf2-icon-wiki-view" aria-hidden="true"></span>
<span className="nav-text">{gettext('Published Libraries')}</span>
</Link>
</li>
{isDocs &&
<li className="nav-item" onClick={(e) => this.tabItemClick(e, 'drafts')}>
<Link className={`nav-link ellipsis ${this.getActiveClass('drafts')}`} to={siteRoot + 'drafts/'} title={gettext('Drafts')}>