eslint
This commit is contained in:
@ -15,31 +15,31 @@ class PagesPie extends Component {
|
||||
delete params.replace;
|
||||
}
|
||||
if (Array.isArray(pages)) {
|
||||
for (let i in pages) {
|
||||
this.pie.push({
|
||||
Page: pages[i],
|
||||
params: params
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.pie.push({
|
||||
Page: pages,
|
||||
params: params
|
||||
});
|
||||
}
|
||||
if(this._mounted)
|
||||
this.forceUpdate()
|
||||
}
|
||||
|
||||
componentWillMount()
|
||||
{
|
||||
this._mounted = true
|
||||
}
|
||||
for (let i in pages) {
|
||||
this.pie.push({
|
||||
Page: pages[i],
|
||||
params: params
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.pie.push({
|
||||
Page: pages,
|
||||
params: params
|
||||
});
|
||||
}
|
||||
if(this._mounted)
|
||||
this.forceUpdate()
|
||||
}
|
||||
|
||||
componentWillMount()
|
||||
{
|
||||
this._mounted = true
|
||||
}
|
||||
|
||||
componentWillUnmount()
|
||||
{
|
||||
this._mounted = false
|
||||
}
|
||||
componentWillUnmount()
|
||||
{
|
||||
this._mounted = false
|
||||
}
|
||||
|
||||
close(count) {
|
||||
if (count && typeof count === 'number') {
|
||||
@ -59,7 +59,7 @@ class PagesPie extends Component {
|
||||
}
|
||||
// ОТРИСОВКА
|
||||
render() {
|
||||
if (this.pie.length > 0) {
|
||||
if (this.pie.length > 0) {
|
||||
return (
|
||||
<div
|
||||
className={'pie full-size ' + (this.props.className || '')}
|
||||
|
@ -104,19 +104,19 @@ const treeToTorrentFiles = (tree, torrent, toggles) => {
|
||||
leftIcon={!tree[file].__fileBT ? <FileFolder /> : contentIcon(fileTypeDetect({path: file}))}
|
||||
rightToggle={
|
||||
newToggles.length > 0
|
||||
?
|
||||
<Toggle
|
||||
toggled={newToggles.every( ({selected}) => selected )}
|
||||
onToggle={(e, checked) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
let toggleValues = {}
|
||||
newToggles.forEach(({downloadIndex}) => toggleValues[downloadIndex] = checked)
|
||||
window.torrentSocket.emit('downloadSelectFiles', torrent, toggleValues)
|
||||
}}
|
||||
/>
|
||||
:
|
||||
null
|
||||
?
|
||||
<Toggle
|
||||
toggled={newToggles.every( ({selected}) => selected )}
|
||||
onToggle={(e, checked) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
let toggleValues = {}
|
||||
newToggles.forEach(({downloadIndex}) => toggleValues[downloadIndex] = checked)
|
||||
window.torrentSocket.emit('downloadSelectFiles', torrent, toggleValues)
|
||||
}}
|
||||
/>
|
||||
:
|
||||
null
|
||||
}
|
||||
/>);
|
||||
|
||||
|
@ -302,13 +302,13 @@ export default class Torrent extends Component {
|
||||
node.onclick = () => { return false }
|
||||
}}>
|
||||
<div className='column' style={{height: 'auto', whiteSpace: 'normal', paddingTop: '0.30em'}}>
|
||||
{
|
||||
torrent.info && torrent.info.name
|
||||
&&
|
||||
<div className='row w100p inline fs0-85' style={{color: 'grey', padding: '4px 0px 5px'}}>
|
||||
{torrent.info.name}
|
||||
</div>
|
||||
}
|
||||
{
|
||||
torrent.info && torrent.info.name
|
||||
&&
|
||||
<div className='row w100p inline fs0-85' style={{color: 'grey', padding: '4px 0px 5px'}}>
|
||||
{torrent.info.name}
|
||||
</div>
|
||||
}
|
||||
<div className='row w100p inline'>
|
||||
<div style={{color: torrent.contentCategory != 'xxx' ? (torrent.peer ? '#5252d1' : 'black') : (torrent.peer ? '#9083e2' : 'grey')}}>
|
||||
{
|
||||
@ -320,17 +320,17 @@ export default class Torrent extends Component {
|
||||
torrent.path && torrent.path.length > 0
|
||||
?
|
||||
torrent.path.map((path, index) => {
|
||||
const boldRe = /\<b\>(.+?)\<\/b\>/g;
|
||||
let boldText;
|
||||
let newPath = [];
|
||||
let idx = 0;
|
||||
while ((boldText = boldRe.exec(path)) !== null) {
|
||||
newPath.push(<span>{path.substring(idx, boldText.index)}</span>);
|
||||
newPath.push(<b>{boldText[1]}</b>);
|
||||
idx = boldRe.lastIndex;
|
||||
}
|
||||
newPath.push(<span>{path.substring(idx, path.length)}</span>);
|
||||
return <div key={index} className='break-word fs0-75' style={{paddingTop: '0.3em', marginLeft: '0.6em'}}>{newPath}</div>
|
||||
const boldRe = /\<b\>(.+?)\<\/b\>/g;
|
||||
let boldText;
|
||||
let newPath = [];
|
||||
let idx = 0;
|
||||
while ((boldText = boldRe.exec(path)) !== null) {
|
||||
newPath.push(<span>{path.substring(idx, boldText.index)}</span>);
|
||||
newPath.push(<b>{boldText[1]}</b>);
|
||||
idx = boldRe.lastIndex;
|
||||
}
|
||||
newPath.push(<span>{path.substring(idx, path.length)}</span>);
|
||||
return <div key={index} className='break-word fs0-75' style={{paddingTop: '0.3em', marginLeft: '0.6em'}}>{newPath}</div>
|
||||
})
|
||||
:
|
||||
null
|
||||
|
@ -30,7 +30,7 @@ export default (props) => {
|
||||
{
|
||||
info.trackers.includes('rutor')
|
||||
&&
|
||||
<a href={`http://www.rutor.is/torrent/${info.rutorThreadId}`}><img src={RutorIcon} style={{height: 32}} /></a>
|
||||
<a href={`http://www.rutor.is/torrent/${info.rutorThreadId}`}><img src={RutorIcon} style={{height: 32}} /></a>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
|
Reference in New Issue
Block a user