feat(p2p): p2p torrents replication

This commit is contained in:
Alexey Kasyanchuk
2018-03-12 15:55:30 +03:00
parent 223fe8c1ab
commit db8a8cbd36
5 changed files with 152 additions and 68 deletions

View File

@ -11,7 +11,7 @@ import Slider from 'material-ui/Slider'
import fs from 'fs'
const {dialog} = require('electron').remote
export default class AdminPage extends Page {
export default class ConfigPage extends Page {
constructor(props) {
super(props)
this.setTitle('Rats settings');
@ -196,6 +196,18 @@ export default class AdminPage extends Page {
/>
</div>
</div>
<div className='column w100p'>
<Toggle
style={{marginTop: '10px'}}
label="P2P torrents replication"
toggled={this.options.p2pReplication}
onToggle={(e, checked) => {
this.options.p2pReplication = checked
this.forceUpdate()
}}
/>
<div className='fs0-75' style={{color: 'grey'}}>* Enable torrents replication from another rats clients. Dont recomended if torrent scanner works correct.</div>
</div>
<div style={{marginTop: 10}}>Torrent network scanner settings:</div>

View File

@ -4,7 +4,7 @@ import PagesPie from './pages-pie.js';
import IndexPage from './index-page.js'
import TorrentPage from './torrent-page.js'
import DMCAPage from './dmca-page.js'
import AdminPage from './admin-page.js'
import ConfigPage from './config-page.js'
import TopPage from './top-page.js'
import DownloadPage from './download-page.js'
import ChangelogPage from './changelog-page.js'
@ -72,7 +72,7 @@ router('/DMCA', () => {
router('/config', () => {
//singleton
PagesPie.instance().open(AdminPage, {replace: 'all'});
PagesPie.instance().open(ConfigPage, {replace: 'all'});
});
router('/top', () => {