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