diff --git a/lib/bad-words.js b/lib/bad-words.js index 86468e1..d655593 100644 --- a/lib/bad-words.js +++ b/lib/bad-words.js @@ -244,6 +244,8 @@ let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx' 'sleeping', 'speculums', 'spread', 'spreading', 'squirting', 'stripper', 'stripping', 'swapping', 'thong', 'thumbs', 'topless', 'toying', 'trix', 'undressing', 'uniform', 'whipcream', 'brazzers', 'порно', -'порн', 'лесб', 'гей', 'геи', 'прон']; +'порн', 'лесб', 'гей', 'геи', 'прон', 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc', +'ptsc', 'yukikax', 'ls-models' +]; module.exports = XXX_BLOCK_WORDS; diff --git a/src/recent-torrents.js b/src/recent-torrents.js index f2a8223..58dede6 100644 --- a/src/recent-torrents.js +++ b/src/recent-torrents.js @@ -1,168 +1,12 @@ import React, { Component } from 'react'; -import formatBytes from './format-bytes' - -import {List, ListItem} from 'material-ui/List'; +import TorrentLine from './torrent' +import {List} from 'material-ui/List'; +import Divider from 'material-ui/Divider'; import Subheader from 'material-ui/Subheader'; import Paper from 'material-ui/Paper'; -import Divider from 'material-ui/Divider'; import FlatButton from 'material-ui/FlatButton'; import RefreshIndicator from 'material-ui/RefreshIndicator'; -const TorrentLine = (props) => { - const torrent = props.torrent; -return ( -
- window.router('/torrent/' + torrent.hash)} - primaryText={{torrent.name}} - secondaryText={ -
-
- { - formatBytes(torrent.size, 1) + ' (' + torrent.files + ' files)' - } -
- { - torrent.path && torrent.path.length > 0 - ? -
{torrent.path}
- : - null - } - { - torrent.seeders || torrent.leechers || torrent.completed - ? -
- 0 ? '#00C853' : 'grey')}}>{torrent.seeders} seeders - 0 ? '#AA00FF' : 'grey'), marginLeft: '12px'}}>{torrent.leechers} leechers - 0 ? '#FF6D00' : 'grey'), marginLeft: '12px'}}>{torrent.completed} completed -
- : - null - } -
- } - leftIcon={ - (() => { - switch(torrent.contentType) - { - case 'video': - return ( - - - - - - - ) - case 'audio': - return ( - - - - - - ) - case 'pictures': - return ( - - - - ) - case 'application': - return ( - - - - ) - case 'books': - return ( - - - - - - - - - ) - default: - return ( - - - - - - - - ) - } - })() - } - rightIcon={ - - { - e.preventDefault(); - e.stopPropagation(); - var win = window.open(`magnet:?xt=urn:btih:${torrent.hash}`, '_self'); - }} viewBox="0 0 24 24"> - - - } - /> - -
- ) -} - -export { TorrentLine } - export default class RecentTorrents extends Component { constructor() { super() diff --git a/src/search-results.js b/src/search-results.js index 6520528..3ac7fb4 100644 --- a/src/search-results.js +++ b/src/search-results.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import { TorrentLine } from './recent-torrents' +import TorrentLine from './torrent' import {List, ListItem} from 'material-ui/List'; import Subheader from 'material-ui/Subheader'; diff --git a/src/torrent.js b/src/torrent.js new file mode 100644 index 0000000..3cf5f71 --- /dev/null +++ b/src/torrent.js @@ -0,0 +1,158 @@ +import React, { Component } from 'react'; +import formatBytes from './format-bytes' +import {ListItem} from 'material-ui/List'; +import Divider from 'material-ui/Divider'; + +export default (props) => { + +const torrent = props.torrent; +return ( +
+ window.router('/torrent/' + torrent.hash)} + primaryText={{torrent.name}} + secondaryText={ +
+
+ { + formatBytes(torrent.size, 1) + ' (' + torrent.files + ' files)' + } +
+ { + torrent.path && torrent.path.length > 0 + ? +
{torrent.path}
+ : + null + } + { + torrent.seeders || torrent.leechers || torrent.completed + ? +
+ 0 ? '#00C853' : 'grey')}}>{torrent.seeders} seeders + 0 ? '#AA00FF' : 'grey'), marginLeft: '12px'}}>{torrent.leechers} leechers + 0 ? '#FF6D00' : 'grey'), marginLeft: '12px'}}>{torrent.completed} completed +
+ : + null + } +
+ } + leftIcon={ + (() => { + switch(torrent.contentType) + { + case 'video': + return ( + + + + + + + ) + case 'audio': + return ( + + + + + + ) + case 'pictures': + return ( + + + + ) + case 'application': + return ( + + + + ) + case 'books': + return ( + + + + + + + + + ) + default: + return ( + + + + + + + + ) + } + })() + } + rightIcon={ + + { + e.preventDefault(); + e.stopPropagation(); + var win = window.open(`magnet:?xt=urn:btih:${torrent.hash}`, '_self'); + }} viewBox="0 0 24 24"> + + + } + /> + +
+ ) +}