исправления кнопок при поиске

This commit is contained in:
Alexey Kasyanchuk 2017-01-28 14:57:37 +03:00
parent 2106168147
commit f45abcdf0d
3 changed files with 39 additions and 12 deletions

View File

@ -222,13 +222,13 @@ let XXX_BLOCK_WORDS = ['incestcash', 'asacp', 'xondemand', 'yankscash', 'klixxx'
'xxxpussy', 'xxx-rated', 'xxxrated', 'xxxsex', 'xxxsites', 'xxxsluts', 'xxxpussy', 'xxx-rated', 'xxxrated', 'xxxsex', 'xxxsites', 'xxxsluts',
'xxxstories', 'xxxteen', 'xxxthumbnails', 'xxxthumbs', 'xxxtoons', 'xxxtoys', 'xxxstories', 'xxxteen', 'xxxthumbnails', 'xxxthumbs', 'xxxtoons', 'xxxtoys',
'xxxvideo', 'xxxvideos', 'xxxwomen', 'xxxx', 'xxxxx', 'xxxxxx', 'xxxvideo', 'xxxvideos', 'xxxwomen', 'xxxx', 'xxxxx', 'xxxxxx',
'filthyfarm', 'adultcheck', 'erotic', 'mistresses', 'naughty', 'access', 'filthyfarm', 'adultcheck', 'erotic', 'mistresses', 'naughty',
'adult', 'amateur', 'amateurs', 'anal', 'analau', 'poker', 'adult', 'amateur', 'amateurs', 'anal', 'analau', 'poker',
'anally', 'asian', 'swinging', 'ass', 'orgy', 'sexvideos', 'anally', 'asian', 'swinging', 'ass', 'orgy', 'sexvideos',
'babe', 'babes', 'bare', 'glamour', 'casino', 'bed', 'babe', 'babes', 'bare', 'glamour', 'casino', 'bed',
'vibrator', 'bikini', 'bisexual', 'blonde', 'breasted', 'breasts', 'vibrator', 'bikini', 'bisexual', 'blonde', 'breasted', 'breasts',
'busty', 'butts', 'candy', 'caning', 'caps', 'catholic', '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', 'cucumber', 'doll', 'dolls', 'dolly', 'dominating', 'drinking',
'drunk', 'fat', 'feet', 'fingering', 'fishnet', 'flasher', 'drunk', 'fat', 'feet', 'fingering', 'fishnet', 'flasher',
'footjob', 'foreplay', 'foreplaying', 'girlfriend', 'girlfriends', 'gymnast', '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', 'insertions', 'interracial', 'jerka', 'juicy', 'kissing', 'kitty',
'lactating', 'ladyboy', 'lance', 'latina', 'latins', 'leather', 'lactating', 'ladyboy', 'lance', 'latina', 'latins', 'leather',
'legs', 'lesbian', 'lesbians', 'licking', 'lingerie', 'lubricants', 'legs', 'lesbian', 'lesbians', 'licking', 'lingerie', 'lubricants',
'master', 'mature', 'midget', 'minor', 'mistress', 'nude', 'mature', 'midget', 'minor', 'mistress', 'nude',
'older', 'olez', 'oral', 'panties', 'pantyhose', 'pedro', 'older', 'olez', 'oral', 'panties', 'pantyhose', 'pedro',
'peeing', 'penetration', 'pics', 'pigtailed', 'pleasure', 'plump', 'peeing', 'penetration', 'pigtailed', 'pleasure', 'plump',
'plumper', 'poser', 'posers', 'poses', 'posing', 'prosecuted', 'plumper', 'poser', 'posers', 'poses', 'posing', 'prosecuted',
'punishment', 'reproducing', 'sex', 'shaved', 'shock', 'slave', 'punishment', 'reproducing', 'sex', 'shaved', 'shock', 'slave',
'sleeping', 'speculums', 'spread', 'spreading', 'squirting', 'stripper', 'sleeping', 'speculums', 'spread', 'spreading', 'squirting', 'stripper',
'stripping', 'swapping', 'thong', 'thumbs', 'topless', 'toying', 'stripping', 'swapping', 'thong', 'topless', 'toying',
'trix', 'undressing', 'uniform', 'whipcream', 'brazzers', 'порно', 'trix', 'undressing', 'uniform', 'whipcream', 'brazzers', 'порно',
'порн', 'лесб', 'гей', 'геи', 'прон', 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc', 'порн', 'лесб', 'гей', 'геи', 'прон', 'catgoddess', 'gracel', 'fatman', 'falko', 'pthc',
'ptsc', 'yukikax', 'ls-models' 'ptsc', 'yukikax', 'ls-models'

View File

@ -4,6 +4,7 @@ import TorrentLine from './torrent'
import {List, ListItem} from 'material-ui/List'; import {List, ListItem} from 'material-ui/List';
import Subheader from 'material-ui/Subheader'; import Subheader from 'material-ui/Subheader';
import Divider from 'material-ui/Divider'; import Divider from 'material-ui/Divider';
import LinearProgress from 'material-ui/LinearProgress';
export default class SearchResults extends Component { export default class SearchResults extends Component {
render() { render() {
@ -29,7 +30,7 @@ export default class SearchResults extends Component {
null null
} }
{ {
this.props.moreTorrentsEnabled this.props.moreTorrentsEnabled && !this.props.moreTorrentsIndicator
? ?
<div> <div>
<ListItem innerDivStyle={{textAlign: 'center', padding: '1em'}} primaryText={<span>More Torrents</span>} onClick={() => { <ListItem innerDivStyle={{textAlign: 'center', padding: '1em'}} primaryText={<span>More Torrents</span>} onClick={() => {
@ -41,6 +42,15 @@ export default class SearchResults extends Component {
: :
null null
} }
{
this.props.moreTorrentsIndicator
?
<div style={{padding: '0.8em'}}>
<LinearProgress mode="indeterminate" />
</div>
:
null
}
{ {
this.props.filesSearchResults && this.props.filesSearchResults.length > 0 this.props.filesSearchResults && this.props.filesSearchResults.length > 0
? ?
@ -53,7 +63,7 @@ export default class SearchResults extends Component {
null null
} }
{ {
this.props.moreFilesEnabled this.props.moreFilesEnabled && !this.props.moreFilesIndicator
? ?
<div> <div>
<ListItem innerDivStyle={{textAlign: 'center', padding: '1em'}} primaryText='More Files' onClick={() => { <ListItem innerDivStyle={{textAlign: 'center', padding: '1em'}} primaryText='More Files' onClick={() => {
@ -65,6 +75,15 @@ export default class SearchResults extends Component {
: :
null null
} }
{
this.props.moreFilesIndicator
?
<div style={{padding: '0.8em'}}>
<LinearProgress mode="indeterminate" />
</div>
:
null
}
</List> </List>
); );
} }

View File

@ -18,7 +18,9 @@ export default class Search extends Component {
this.state = { this.state = {
searchingIndicator: false, searchingIndicator: false,
safeSearchText: 'safe search enabled', safeSearchText: 'safe search enabled',
safeSearchColor: 'rgb(0, 188, 212)' safeSearchColor: 'rgb(0, 188, 212)',
moreTorrentsIndicator: false,
moreFilesIndicator: false,
} }
this.searchLimit = 10 this.searchLimit = 10
} }
@ -74,6 +76,8 @@ export default class Search extends Component {
})); }));
} }
moreTorrents() { moreTorrents() {
this.setState({moreTorrentsIndicator: true});
window.torrentSocket.emit('searchTorrent', this.currentSearch, { window.torrentSocket.emit('searchTorrent', this.currentSearch, {
index: this.searchTorrents.length, index: this.searchTorrents.length,
limit: this.searchLimit, limit: this.searchLimit,
@ -84,7 +88,7 @@ export default class Search extends Component {
if(torrents.length != this.searchLimit) if(torrents.length != this.searchLimit)
this.moreSearchTorrents = false; this.moreSearchTorrents = false;
this.forceUpdate(); this.setState({moreTorrentsIndicator: false});
} }
})); }));
} }
@ -95,6 +99,8 @@ export default class Search extends Component {
index += torrent.path.length; index += torrent.path.length;
}); });
this.setState({moreFilesIndicator: true});
window.torrentSocket.emit('searchFiles', this.currentSearch, { window.torrentSocket.emit('searchFiles', this.currentSearch, {
index: index, index: index,
limit: this.searchLimit, limit: this.searchLimit,
@ -110,7 +116,7 @@ export default class Search extends Component {
if(files != this.searchLimit) if(files != this.searchLimit)
this.moreSearchFiles = false; this.moreSearchFiles = false;
this.forceUpdate(); this.setState({moreFilesIndicator: false});
} }
})); }));
} }
@ -204,10 +210,12 @@ export default class Search extends Component {
torrentsSearchResults={this.searchTorrents} torrentsSearchResults={this.searchTorrents}
filesSearchResults={this.searchFiles} filesSearchResults={this.searchFiles}
moreTorrentsEnabled={this.moreSearchTorrents} moreTorrentsEnabled={this.moreSearchTorrents && !this.state.searchingIndicator}
moreFilesEnabled={this.moreSearchFiles} moreFilesEnabled={this.moreSearchFiles && !this.state.searchingIndicator}
onMoreTorrents={() => this.moreTorrents()} onMoreTorrents={() => this.moreTorrents()}
onMoreFiles={() => this.moreFiles()} onMoreFiles={() => this.moreFiles()}
moreTorrentsIndicator={this.state.moreTorrentsIndicator}
moreFilesIndicator={this.state.moreFilesIndicator}
/> />
</div> </div>
); );