mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-29 04:01:24 +00:00
fix-warnings
This commit is contained in:
parent
dae726b432
commit
479350dc77
@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import MD5 from 'MD5';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { gettext, siteRoot, mediaUrl, username, canGenerateShareLink } from '../../utils/constants';
|
||||
import { gettext, siteRoot, mediaUrl, username } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import URLDecorator from '../../utils/url-decorator';
|
||||
@ -411,7 +411,7 @@ class DirentListItem extends React.Component {
|
||||
dragStartItemData = JSON.parse(dragStartItemData);
|
||||
if (Array.isArray(dragStartItemData)) { //move items
|
||||
let direntPaths = dragStartItemData.map(draggedItem => {
|
||||
return draggedItem.nodeRootPath
|
||||
return draggedItem.nodeRootPath;
|
||||
});
|
||||
|
||||
let selectedPath = Utils.joinPath(this.props.path, this.props.dirent.name);
|
||||
|
@ -550,11 +550,11 @@ class LibContentView extends React.Component {
|
||||
seafileAPI.listDir(repoID, path).then(res => {
|
||||
let newDirentList = res.data.dirent_list;
|
||||
let newAddedDirents = newDirentList.filter(item => {
|
||||
return !nodeChildrenNames.includes(item.name)
|
||||
})
|
||||
return !nodeChildrenNames.includes(item.name);
|
||||
});
|
||||
newAddedDirents.map(item => {
|
||||
this.addNodeToTree(item.name, path, item.type);
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { navigate } from '@reach/router';
|
||||
import moment from 'moment';
|
||||
import { Utils } from './utils/utils';
|
||||
import { gettext, loginUrl, siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle } from './utils/constants';
|
||||
import { seafileAPI } from './utils/seafile-api';
|
||||
@ -233,26 +232,26 @@ class Content extends React.Component {
|
||||
}
|
||||
|
||||
return (
|
||||
<table className="table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
{this.theadData.map((item, index) => {
|
||||
return <th key={index} width={item.width}>{item.text}</th>;
|
||||
})}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{folderItems.map((item, index) => {
|
||||
return <FolderItem
|
||||
key={index}
|
||||
item={item}
|
||||
folderPath={folderPath}
|
||||
renderFolder={this.props.renderFolder}
|
||||
/>;
|
||||
})
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<table className="table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
{this.theadData.map((item, index) => {
|
||||
return <th key={index} width={item.width}>{item.text}</th>;
|
||||
})}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{folderItems.map((item, index) => {
|
||||
return <FolderItem
|
||||
key={index}
|
||||
item={item}
|
||||
folderPath={folderPath}
|
||||
renderFolder={this.props.renderFolder}
|
||||
/>;
|
||||
})
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -231,8 +231,8 @@ export const Utils = {
|
||||
|
||||
isIEBrower: function() { // is ie <= ie11 not include Edge
|
||||
var userAgent = navigator.userAgent;
|
||||
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
|
||||
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
|
||||
var isIE = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1;
|
||||
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1;
|
||||
return isIE || isIE11;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user