From f45abcdf0daed60a5f987ef87f7286190bdbd86b Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Sat, 28 Jan 2017 14:57:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bad-words.js | 10 +++++----- src/search-results.js | 23 +++++++++++++++++++++-- src/search.js | 18 +++++++++++++----- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/lib/bad-words.js b/lib/bad-words.js index d655593..1f27c76 100644 --- a/lib/bad-words.js +++ b/lib/bad-words.js @@ -222,13 +222,13 @@ let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx' 'xxxpussy', 'xxx-rated', 'xxxrated', 'xxxsex', 'xxxsites', 'xxxsluts', 'xxxstories', 'xxxteen', 'xxxthumbnails', 'xxxthumbs', 'xxxtoons', 'xxxtoys', 'xxxvideo', 'xxxvideos', 'xxxwomen', 'xxxx', 'xxxxx', 'xxxxxx', -'filthyfarm', 'adultcheck', 'erotic', 'mistresses', 'naughty', 'access', +'filthyfarm', 'adultcheck', 'erotic', 'mistresses', 'naughty', 'adult', 'amateur', 'amateurs', 'anal', 'analau', 'poker', 'anally', 'asian', 'swinging', 'ass', 'orgy', 'sexvideos', 'babe', 'babes', 'bare', 'glamour', 'casino', 'bed', 'vibrator', 'bikini', 'bisexual', 'blonde', 'breasted', 'breasts', 'busty', 'butts', 'candy', 'caning', 'caps', 'catholic', -'chained', 'chested', 'chubby', 'close-ups', 'collection', 'coupling', +'chained', 'chested', 'chubby', 'close-ups', 'coupling', 'cucumber', 'doll', 'dolls', 'dolly', 'dominating', 'drinking', 'drunk', 'fat', 'feet', 'fingering', 'fishnet', 'flasher', 'footjob', 'foreplay', 'foreplaying', 'girlfriend', 'girlfriends', 'gymnast', @@ -236,13 +236,13 @@ let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx' 'insertions', 'interracial', 'jerka', 'juicy', 'kissing', 'kitty', 'lactating', 'ladyboy', 'lance', 'latina', 'latins', 'leather', 'legs', 'lesbian', 'lesbians', 'licking', 'lingerie', 'lubricants', -'master', 'mature', 'midget', 'minor', 'mistress', 'nude', +'mature', 'midget', 'minor', 'mistress', 'nude', 'older', 'olez', 'oral', 'panties', 'pantyhose', 'pedro', -'peeing', 'penetration', 'pics', 'pigtailed', 'pleasure', 'plump', +'peeing', 'penetration', 'pigtailed', 'pleasure', 'plump', 'plumper', 'poser', 'posers', 'poses', 'posing', 'prosecuted', 'punishment', 'reproducing', 'sex', 'shaved', 'shock', 'slave', 'sleeping', 'speculums', 'spread', 'spreading', 'squirting', 'stripper', -'stripping', 'swapping', 'thong', 'thumbs', 'topless', 'toying', +'stripping', 'swapping', 'thong', 'topless', 'toying', 'trix', 'undressing', 'uniform', 'whipcream', 'brazzers', 'порно', 'порн', 'лесб', 'гей', 'геи', 'прон', 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc', 'ptsc', 'yukikax', 'ls-models' diff --git a/src/search-results.js b/src/search-results.js index 7fa0d55..626f197 100644 --- a/src/search-results.js +++ b/src/search-results.js @@ -4,6 +4,7 @@ import TorrentLine from './torrent' import {List, ListItem} from 'material-ui/List'; import Subheader from 'material-ui/Subheader'; import Divider from 'material-ui/Divider'; +import LinearProgress from 'material-ui/LinearProgress'; export default class SearchResults extends Component { render() { @@ -29,7 +30,7 @@ export default class SearchResults extends Component { null } { - this.props.moreTorrentsEnabled + this.props.moreTorrentsEnabled && !this.props.moreTorrentsIndicator ?
More Torrents} onClick={() => { @@ -41,6 +42,15 @@ export default class SearchResults extends Component { : null } + { + this.props.moreTorrentsIndicator + ? +
+ +
+ : + null + } { this.props.filesSearchResults && this.props.filesSearchResults.length > 0 ? @@ -53,7 +63,7 @@ export default class SearchResults extends Component { null } { - this.props.moreFilesEnabled + this.props.moreFilesEnabled && !this.props.moreFilesIndicator ?
{ @@ -65,6 +75,15 @@ export default class SearchResults extends Component { : null } + { + this.props.moreFilesIndicator + ? +
+ +
+ : + null + } ); } diff --git a/src/search.js b/src/search.js index d36f447..da91d96 100644 --- a/src/search.js +++ b/src/search.js @@ -18,7 +18,9 @@ export default class Search extends Component { this.state = { searchingIndicator: false, safeSearchText: 'safe search enabled', - safeSearchColor: 'rgb(0, 188, 212)' + safeSearchColor: 'rgb(0, 188, 212)', + moreTorrentsIndicator: false, + moreFilesIndicator: false, } this.searchLimit = 10 } @@ -74,6 +76,8 @@ export default class Search extends Component { })); } moreTorrents() { + this.setState({moreTorrentsIndicator: true}); + window.torrentSocket.emit('searchTorrent', this.currentSearch, { index: this.searchTorrents.length, limit: this.searchLimit, @@ -84,7 +88,7 @@ export default class Search extends Component { if(torrents.length != this.searchLimit) this.moreSearchTorrents = false; - this.forceUpdate(); + this.setState({moreTorrentsIndicator: false}); } })); } @@ -95,6 +99,8 @@ export default class Search extends Component { index += torrent.path.length; }); + this.setState({moreFilesIndicator: true}); + window.torrentSocket.emit('searchFiles', this.currentSearch, { index: index, limit: this.searchLimit, @@ -110,7 +116,7 @@ export default class Search extends Component { if(files != this.searchLimit) this.moreSearchFiles = false; - this.forceUpdate(); + this.setState({moreFilesIndicator: false}); } })); } @@ -204,10 +210,12 @@ export default class Search extends Component { torrentsSearchResults={this.searchTorrents} filesSearchResults={this.searchFiles} - moreTorrentsEnabled={this.moreSearchTorrents} - moreFilesEnabled={this.moreSearchFiles} + moreTorrentsEnabled={this.moreSearchTorrents && !this.state.searchingIndicator} + moreFilesEnabled={this.moreSearchFiles && !this.state.searchingIndicator} onMoreTorrents={() => this.moreTorrents()} onMoreFiles={() => this.moreFiles()} + moreTorrentsIndicator={this.state.moreTorrentsIndicator} + moreFilesIndicator={this.state.moreFilesIndicator} />
);