mirror of
https://github.com/zoriya/flood.git
synced 2026-05-28 09:27:35 +00:00
Move torrent details to modal
This commit is contained in:
@@ -8,22 +8,22 @@ import TorrentStore from './TorrentStore';
|
||||
|
||||
class UIStoreClass extends BaseStore {
|
||||
constructor() {
|
||||
super();
|
||||
super(...arguments);
|
||||
|
||||
this.activeContextMenu = null;
|
||||
this.activeModal = null;
|
||||
this.dependencies = [];
|
||||
this.latestTorrentLocation = null;
|
||||
this.torrentDetailsHash = null;
|
||||
this.torrentDetailsOpen = false;
|
||||
// this.torrentDetailsOpen = false;
|
||||
}
|
||||
|
||||
closeTorrentDetailsPanel() {
|
||||
if (this.torrentDetailsOpen) {
|
||||
this.torrentDetailsOpen = false;
|
||||
this.emit(EventTypes.UI_TORRENT_DETAILS_OPEN_CHANGE);
|
||||
}
|
||||
}
|
||||
// closeTorrentDetailsPanel() {
|
||||
// if (this.torrentDetailsOpen) {
|
||||
// this.torrentDetailsOpen = false;
|
||||
// this.emit(EventTypes.UI_TORRENT_DETAILS_OPEN_CHANGE);
|
||||
// }
|
||||
// }
|
||||
|
||||
getActiveContextMenu() {
|
||||
return this.activeContextMenu;
|
||||
@@ -55,9 +55,9 @@ class UIStoreClass extends BaseStore {
|
||||
return this.dependencies.length === 0;
|
||||
}
|
||||
|
||||
isTorrentDetailsOpen() {
|
||||
return this.torrentDetailsOpen;
|
||||
}
|
||||
// isTorrentDetailsOpen() {
|
||||
// return this.torrentDetailsOpen;
|
||||
// }
|
||||
|
||||
registerDependency(ids) {
|
||||
if (!Array.isArray(ids)) {
|
||||
@@ -104,9 +104,9 @@ UIStore.dispatcherID = AppDispatcher.register((payload) => {
|
||||
const {action, source} = payload;
|
||||
|
||||
switch (action.type) {
|
||||
case ActionTypes.UI_CLICK_TORRENT_DETAILS:
|
||||
UIStore.handleTorrentDetailsClick(action.data.hash, action.data.event);
|
||||
break;
|
||||
// case ActionTypes.UI_CLICK_TORRENT_DETAILS:
|
||||
// UIStore.handleTorrentDetailsClick(action.data.hash, action.data.event);
|
||||
// break;
|
||||
case ActionTypes.UI_CLICK_TORRENT:
|
||||
UIStore.handleTorrentClick(action.data.hash);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user