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

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',
'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'

View File

@ -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
?
<div>
<ListItem innerDivStyle={{textAlign: 'center', padding: '1em'}} primaryText={<span>More Torrents</span>} onClick={() => {
@ -41,6 +42,15 @@ export default class SearchResults extends Component {
:
null
}
{
this.props.moreTorrentsIndicator
?
<div style={{padding: '0.8em'}}>
<LinearProgress mode="indeterminate" />
</div>
:
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
?
<div>
<ListItem innerDivStyle={{textAlign: 'center', padding: '1em'}} primaryText='More Files' onClick={() => {
@ -65,6 +75,15 @@ export default class SearchResults extends Component {
:
null
}
{
this.props.moreFilesIndicator
?
<div style={{padding: '0.8em'}}>
<LinearProgress mode="indeterminate" />
</div>
:
null
}
</List>
);
}

View File

@ -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}
/>
</div>
);