this.forceUpdate()
- }
- componentWillUnmount()
- {
- Search.instance().onSearchUpdate = () => {}
- }
- render() {
- const orderText = (text, field) => {
- if(field !== Search.instance().state.orderBy)
- return text;
-
- if(Search.instance().state.orderDesc)
- return text + ' ⇩'
- else
- return text + ' ⇧'
- }
-
- return (
-
-
- {
- event.preventDefault(); // fix overclick on torrent
- if(value === 'none') {
- Search.instance().setState({orderBy: null}, () => {
- Search.instance().search(true)
- })
- return;
- }
-
- if(value === Search.instance().state.orderBy)
- {
- Search.instance().setState({orderDesc: !Search.instance().state.orderDesc}, () => {
- Search.instance().search(true)
- })
- return;
- }
-
- Search.instance().setState({
- orderBy: value,
- orderDesc: (value === 'seeders' || value === 'completed' || value === 'added') ? true : Search.instance().state.orderDesc
- }, () => {
- Search.instance().search(true)
- })
- }}
- >
-
-
-
-
-
-
-
-
- }
-
- moreTorrentsEnabled={Search.instance().moreSearchTorrents && !Search.instance().state.searchingIndicator}
- moreFilesEnabled={Search.instance().moreSearchFiles && !Search.instance().state.searchingIndicator}
- onMoreTorrents={() => Search.instance().moreTorrents()}
- onMoreFiles={() => Search.instance().moreFiles()}
- moreTorrentsIndicator={Search.instance().state.moreTorrentsIndicator}
- moreFilesIndicator={Search.instance().state.moreFilesIndicator}
- />
-
-
-
-
-
-
- );
- }
-}
diff --git a/src/app/router.js b/src/app/router.js
index 77d72bb..d780495 100644
--- a/src/app/router.js
+++ b/src/app/router.js
@@ -1,7 +1,8 @@
//import router from 'page';
import PagesPie from './pages-pie.js';
-import IndexPage from './index-page.js'
+import FeedPage from './feed-page.js'
+import ActivityPage from './activity-page'
import TorrentPage from './torrent-page.js'
import DMCAPage from './dmca-page.js'
import ConfigPage from './config-page.js'
@@ -54,7 +55,7 @@ window.router = router;
router('/', () => {
//singleton
- PagesPie.instance().open(IndexPage, {replace: 'all'});
+ PagesPie.instance().open(FeedPage, {replace: 'all'});
});
router('/torrent/:hash', (e) => {
@@ -91,6 +92,11 @@ router('/downloads', () => {
PagesPie.instance().open(DownloadPage, {replace: 'all'});
});
+router('/activity', () => {
+ //singleton
+ PagesPie.instance().open(ActivityPage, {replace: 'all'});
+});
+
router('/changelog', () => {
//singleton
PagesPie.instance().open(ChangelogPage, {replace: 'all'});
diff --git a/src/background/api.js b/src/background/api.js
index ef82de8..df0ac3c 100644
--- a/src/background/api.js
+++ b/src/background/api.js
@@ -779,7 +779,7 @@ module.exports = async ({
// call once to get bigest feed
let feedLock = false
- this.p2p.events.on('peer', () => {
+ p2p.events.on('peer', () => {
if(feedLock)
return
feedLock = true