Add move torrents option to context menu

This commit is contained in:
John Furrow
2016-02-28 19:24:59 -08:00
parent 7e3403238e
commit 635b30afeb
27 changed files with 574 additions and 74 deletions

View File

@@ -4,6 +4,7 @@ import BaseStore from './BaseStore';
import EventTypes from '../constants/EventTypes';
import {selectTorrents} from '../util/selectTorrents';
import TorrentActions from '../actions/TorrentActions';
import TorrentStore from './TorrentStore';
class UIStoreClass extends BaseStore {
constructor() {
@@ -77,9 +78,9 @@ class UIStoreClass extends BaseStore {
}
}
const UIStore = new UIStoreClass();
let UIStore = new UIStoreClass();
AppDispatcher.register((payload) => {
UIStore.dispatcherID = AppDispatcher.register((payload) => {
const {action, source} = payload;
switch (action.type) {
@@ -92,6 +93,9 @@ AppDispatcher.register((payload) => {
case ActionTypes.UI_DISPLAY_MODAL:
UIStore.setActiveModal(action.data);
break;
case ActionTypes.CLIENT_MOVE_TORRENTS_SUCCESS:
UIStore.setActiveModal(null);
break;
case ActionTypes.UI_DISPLAY_CONTEXT_MENU:
UIStore.setActiveContextMenu(action.data);
break;