mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
fix warnings (#3444)
This commit is contained in:
@@ -3,8 +3,6 @@ import PropTypes from 'prop-types';
|
||||
import { Link } from '@reach/router';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { siteRoot, gettext } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import FileTag from '../../models/file-tag';
|
||||
import InternalLinkDialog from '../dialog/internal-link-dialog';
|
||||
|
||||
const propTypes = {
|
||||
@@ -101,7 +99,7 @@ class DirPath extends React.Component {
|
||||
{(this.props.isViewFile && fileTags.length !== 0) &&
|
||||
<span id='column-mode-file-tags' className="tag-list tag-list-stacked align-middle ml-1">
|
||||
{fileTags.map((fileTag, index) => {
|
||||
return (<span className="file-tag" key={fileTag.id} style={{zIndex: index, backgroundColor: fileTag.color}}></span>)
|
||||
return (<span className="file-tag" key={fileTag.id} style={{zIndex: index, backgroundColor: fileTag.color}}></span>);
|
||||
})}
|
||||
<UncontrolledTooltip target="column-mode-file-tags" placement="bottom">
|
||||
{tagTitle}
|
||||
|
@@ -40,6 +40,8 @@ const propTypes = {
|
||||
isDirentDetailShow: PropTypes.bool.isRequired,
|
||||
onGridItemClick: PropTypes.func,
|
||||
onAddFolder: PropTypes.func.isRequired,
|
||||
showDirentDetail: PropTypes.func,
|
||||
onItemRename: PropTypes.func,
|
||||
};
|
||||
|
||||
class DirentGridView extends React.Component{
|
||||
@@ -61,7 +63,7 @@ class DirentGridView extends React.Component{
|
||||
isMutipleOperation: false,
|
||||
isGridItemFreezed: false,
|
||||
activeDirent: null,
|
||||
}
|
||||
};
|
||||
this.isRepoOwner = props.currentRepoInfo.owner_email === username;
|
||||
}
|
||||
|
||||
@@ -176,7 +178,7 @@ class DirentGridView extends React.Component{
|
||||
}
|
||||
|
||||
onDetails = (dirent) => {
|
||||
this.props.onGridItemClick(dirent)
|
||||
this.props.onGridItemClick(dirent);
|
||||
this.props.showDirentDetail();
|
||||
}
|
||||
|
||||
@@ -266,7 +268,7 @@ class DirentGridView extends React.Component{
|
||||
this.setState({
|
||||
isRenameDialogShow: !this.state.isRenameDialogShow,
|
||||
});
|
||||
this.props.onItemRename(this.state.activeDirent, newName)
|
||||
this.props.onItemRename(this.state.activeDirent, newName);
|
||||
}
|
||||
|
||||
|
||||
@@ -310,7 +312,7 @@ class DirentGridView extends React.Component{
|
||||
}
|
||||
|
||||
closeImagePopup = () => {
|
||||
this.setState({isImagePopupOpen: false})
|
||||
this.setState({isImagePopupOpen: false});
|
||||
}
|
||||
|
||||
moveToPrevImage = () => {
|
||||
@@ -344,7 +346,7 @@ class DirentGridView extends React.Component{
|
||||
}
|
||||
|
||||
onGridContainerMouseDown = (event) => {
|
||||
this.onMouseDown(event)
|
||||
this.onMouseDown(event);
|
||||
}
|
||||
|
||||
onGridItemMouseDown = (event) => {
|
||||
@@ -358,7 +360,7 @@ class DirentGridView extends React.Component{
|
||||
}
|
||||
|
||||
onGridContainerContextMenu = (event) => {
|
||||
let id = "dirent-grid-container-menu"
|
||||
let id = 'dirent-grid-container-menu';
|
||||
let menuList = [TextTranslation.NEW_FOLDER, TextTranslation.NEW_FILE];
|
||||
this.handleContextClick(event, id, menuList);
|
||||
}
|
||||
@@ -414,7 +416,7 @@ class DirentGridView extends React.Component{
|
||||
contextmenuList = this.props.showShareBtn ? [SHARE, DOWNLOAD, DELETE, 'Divider'] : [DOWNLOAD, DELETE, 'Divider'];
|
||||
|
||||
if (dirent.type === 'file') {
|
||||
contextmenuList = canGenerateShareLink ? [SHARE, DOWNLOAD, DELETE, 'Divider'] : [DOWNLOAD, DELETE, 'Divider']
|
||||
contextmenuList = canGenerateShareLink ? [SHARE, DOWNLOAD, DELETE, 'Divider'] : [DOWNLOAD, DELETE, 'Divider'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,7 +510,7 @@ class DirentGridView extends React.Component{
|
||||
onGridItemClick={this.onGridItemClick}
|
||||
activeDirent={this.state.activeDirent}
|
||||
/>
|
||||
)
|
||||
);
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
@@ -609,9 +611,10 @@ class DirentGridView extends React.Component{
|
||||
</ModalPortal>
|
||||
)}
|
||||
</Fragment>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
DirentGridView.propTypes = propTypes;
|
||||
|
||||
export default DirentGridView;
|
@@ -6,7 +6,7 @@ function SessionExpiredTip() {
|
||||
<span className="session-expired-tip">{gettext('You are log out.')}{' '}
|
||||
<a className="action-link session-expired-link" href={`${loginUrl}?next=${encodeURIComponent(location.href)}`}>{gettext('Login again.')}</a>
|
||||
</span>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export default SessionExpiredTip
|
||||
export default SessionExpiredTip;
|
@@ -2,14 +2,14 @@ import React, {Fragment} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {gettext, siteRoot} from '../../utils/constants';
|
||||
import InvitationsToolbar from '../../components/toolbar/invitations-toolbar';
|
||||
import InvitePeopleDialog from "../../components/dialog/invite-people-dialog";
|
||||
import {seafileAPI} from "../../utils/seafile-api";
|
||||
import InvitePeopleDialog from '../../components/dialog/invite-people-dialog';
|
||||
import {seafileAPI} from '../../utils/seafile-api';
|
||||
import {Table} from 'reactstrap';
|
||||
import Loading from "../../components/loading";
|
||||
import Loading from '../../components/loading';
|
||||
import moment from 'moment';
|
||||
import toaster from '../../components/toast';
|
||||
|
||||
import "../../css/invitations.css";
|
||||
import '../../css/invitations.css';
|
||||
|
||||
class InvitationsListItem extends React.Component {
|
||||
|
||||
@@ -47,12 +47,10 @@ class InvitationsListItem extends React.Component {
|
||||
style={!this.state.isOperationShow ? {opacity: 0} : {}}
|
||||
onClick={this.props.onItemDelete.bind(this, invitationItem.token, this.props.index)}></i>;
|
||||
return (
|
||||
<tr onMouseEnter={this.onMouseEnter}
|
||||
onMouseOver={this.onMouseOver}
|
||||
onMouseLeave={this.onMouseLeave}>
|
||||
<tr onMouseEnter={this.onMouseEnter} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave}>
|
||||
<td>{invitationItem.accepter}</td>
|
||||
<td>{moment(invitationItem.invite_time).format("YYYY-MM-DD")}</td>
|
||||
<td>{moment(invitationItem.expire_time).format("YYYY-MM-DD")}</td>
|
||||
<td>{moment(invitationItem.invite_time).format('YYYY-MM-DD')}</td>
|
||||
<td>{moment(invitationItem.expire_time).format('YYYY-MM-DD')}</td>
|
||||
<td>{invitationItem.accept_time && acceptIcon}</td>
|
||||
<td>{!invitationItem.accept_time && deleteOperation}</td>
|
||||
</tr>
|
||||
@@ -94,7 +92,7 @@ class InvitationsListView extends React.Component {
|
||||
onItemDelete={this.onItemDelete}
|
||||
invitation={invitation}
|
||||
index={index}
|
||||
/>)
|
||||
/>);
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -191,7 +189,7 @@ class InvitationsView extends React.Component {
|
||||
<div className="message empty-tip">
|
||||
<h2>{gettext('You have not invited any people.')}</h2>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
handlePermissionDenied = () => {
|
||||
@@ -200,7 +198,7 @@ class InvitationsView extends React.Component {
|
||||
<div className="error mt-6 text-center">
|
||||
<span>{this.state.permissionDeniedMsg}</span>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -240,4 +238,11 @@ class InvitationsView extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
const InvitationsViewPropTypes = {
|
||||
onShowSidePanel: PropTypes.func.isRequired,
|
||||
onSearchedClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
InvitationsView.propTypes = InvitationsViewPropTypes;
|
||||
|
||||
export default InvitationsView;
|
||||
|
@@ -27,7 +27,7 @@ class SidePanel extends React.Component {
|
||||
<ul className="nav nav-pills flex-column nav-container">
|
||||
{canViewSystemInfo &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sysadmin/#dashboard/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sysadmin/#dashboard/'}>
|
||||
<span className="sf2-icon-info" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Info')}</span>
|
||||
</a>
|
||||
@@ -35,7 +35,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isPro && canViewStatistic &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/statistic/file/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/statistic/file/'}>
|
||||
<span className="sf2-icon-histogram" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Statistic')}</span>
|
||||
</a>
|
||||
@@ -43,7 +43,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isDefaultAdmin &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sysadmin/#desktop-devices/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sysadmin/#desktop-devices/'}>
|
||||
<span className="sf2-icon-monitor" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Devices')}</span>
|
||||
</a>
|
||||
@@ -51,7 +51,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{constanceEnabled && canConfigSystem &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/settings/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/settings/'}>
|
||||
<span className="sf2-icon-cog2" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Settings')}</span>
|
||||
</a>
|
||||
@@ -59,7 +59,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{canManageLibrary &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sysadmin/#all-libs/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sysadmin/#all-libs/'}>
|
||||
<span className="sf2-icon-library" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Libraries')}</span>
|
||||
</a>
|
||||
@@ -67,7 +67,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{canManageUser &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/useradmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/useradmin/'}>
|
||||
<span className="sf2-icon-user" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Users')}</span>
|
||||
</a>
|
||||
@@ -75,7 +75,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{canManageGroup &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sysadmin/#groups/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sysadmin/#groups/'}>
|
||||
<span className="sf2-icon-group" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Groups')}</span>
|
||||
</a>
|
||||
@@ -83,7 +83,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isPro && canManageGroup &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sysadmin/#address-book/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sysadmin/#address-book/'}>
|
||||
<span className="sf2-icon-organization" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Departments')}</span>
|
||||
</a>
|
||||
@@ -91,7 +91,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{multiTenancy && isDefaultAdmin &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/orgadmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/orgadmin/'}>
|
||||
<span className="sf2-icon-organization" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Organizations')}</span>
|
||||
</a>
|
||||
@@ -99,7 +99,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{multiInstitution && isDefaultAdmin &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/instadmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/instadmin/'}>
|
||||
<span className="sf2-icon-organization" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Institutions')}</span>
|
||||
</a>
|
||||
@@ -107,7 +107,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isDefaultAdmin &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/notificationadmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/notificationadmin/'}>
|
||||
<span className="sf2-icon-msgs" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Notifications')}</span>
|
||||
</a>
|
||||
@@ -115,7 +115,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isDefaultAdmin &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/publinkadmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/publinkadmin/'}>
|
||||
<span className="sf2-icon-link" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Links')}</span>
|
||||
</a>
|
||||
@@ -123,7 +123,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{sysadminExtraEnabled && canViewUserLog &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/loginadmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/loginadmin/'}>
|
||||
<span className="sf2-icon-clock" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Logs')}</span>
|
||||
</a>
|
||||
@@ -131,7 +131,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isPro && isDefaultAdmin && enableFileScan &&
|
||||
<li className="nav-item">
|
||||
<Link className='nav-link ellipsis' to={siteRoot + "sys/file-scan-records/"}>
|
||||
<Link className='nav-link ellipsis' to={siteRoot + 'sys/file-scan-records/'}>
|
||||
<span className="sf2-icon-security" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('File Scan')}</span>
|
||||
</Link>
|
||||
@@ -139,7 +139,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isPro && isDefaultAdmin &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/virus_scan_records/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/virus_scan_records/'}>
|
||||
<span className="sf2-icon-security" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Virus Scan')}</span>
|
||||
</a>
|
||||
@@ -147,7 +147,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{enableGuestInvitation && isDefaultAdmin &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/invitationadmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/invitationadmin/'}>
|
||||
<span className="sf2-icon-invite" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Invitations')}</span>
|
||||
</a>
|
||||
@@ -155,7 +155,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isDefaultAdmin && enableTermsAndConditions &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sys/termsadmin/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sys/termsadmin/'}>
|
||||
<span className="sf2-icon-wiki" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Terms and Conditions')}</span>
|
||||
</a>
|
||||
@@ -163,7 +163,7 @@ class SidePanel extends React.Component {
|
||||
}
|
||||
{isPro && canViewAdminLog &&
|
||||
<li className="nav-item">
|
||||
<a className='nav-link ellipsis' href={siteRoot + "sysadmin/#admin-operation-logs/"}>
|
||||
<a className='nav-link ellipsis' href={siteRoot + 'sysadmin/#admin-operation-logs/'}>
|
||||
<span className="sf2-icon-admin-log" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Admin Logs')}</span>
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user