начало базовых исправлений
This commit is contained in:
parent
92a68abafe
commit
4843b6eef6
4
index.js
4
index.js
@ -15,7 +15,7 @@ const mysqlSettings = {
|
||||
};
|
||||
|
||||
// Start server
|
||||
server.listen(8099);
|
||||
server.listen(8095);
|
||||
let listenerMysql = mysql.createConnection(mysqlSettings);
|
||||
let socketMysql = mysql.createConnection(mysqlSettings);
|
||||
|
||||
@ -198,5 +198,5 @@ listenerMysql.connect(function(err) {
|
||||
|
||||
// spider.on('nodes', (nodes)=>console.log('foundNodes'))
|
||||
|
||||
spider.listen(4445)
|
||||
//spider.listen(4445)
|
||||
});
|
@ -4,7 +4,7 @@ import './router';
|
||||
import PagesPie from './pages-pie.js';
|
||||
|
||||
var io = require("socket.io-client");
|
||||
window.torrentSocket = io('http://localhost:8099/');
|
||||
window.torrentSocket = io('http://' + document.location.hostname + ':8095/');
|
||||
|
||||
class App extends Component {
|
||||
componentDidMount() {
|
||||
|
@ -3,11 +3,29 @@ import React, { Component } from 'react';
|
||||
import RecentTorrents from './recent-torrents'
|
||||
import Search from './search'
|
||||
|
||||
const Header = (props) => {
|
||||
return (
|
||||
<div className='column center w100p fs0-75'>
|
||||
<div style={{width: '60%'}}>
|
||||
Welcome to BT Search! This is file search engine to the torrents of the internet.
|
||||
Here you can easily find torrent or file that you intrested for. We are not responsible for any content of the site:
|
||||
content are adding automaticly. Content right holders and users can mark/block bad content.
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export {Header}
|
||||
|
||||
export default class IndexPage extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="column">
|
||||
<RecentTorrents />
|
||||
<Header />
|
||||
<div className='column center w100p pad1-25'>
|
||||
<div>Most recent torrents:</div>
|
||||
<RecentTorrents />
|
||||
</div>
|
||||
<Search />
|
||||
</div>
|
||||
);
|
||||
|
@ -1,4 +1,15 @@
|
||||
import React, { Component } from 'react';
|
||||
import formatBytes from './format-bytes'
|
||||
|
||||
const TorrentLine = (props) => {
|
||||
const torrent = props.torrent;
|
||||
return (
|
||||
<div className='clickable row inline fs0-85 pad0-25' onClick={() => window.router('/torrent/' + torrent.hash)}>
|
||||
<div>{torrent.name}</div>
|
||||
<div style={{marginLeft: '8px'}}>({formatBytes(torrent.size, 1)})</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default class RecentTorrents extends Component {
|
||||
constructor() {
|
||||
@ -22,11 +33,7 @@ export default class RecentTorrents extends Component {
|
||||
<div className="list column">
|
||||
{
|
||||
this.torrents.map((torrent, index) =>{
|
||||
return(
|
||||
<div key={index} className='clickable' onClick={() => window.router('/torrent/' + torrent.hash)}>
|
||||
{torrent.name}
|
||||
</div>
|
||||
);
|
||||
return <TorrentLine key={index} torrent={torrent} />;
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user