mirror of
https://github.com/zoriya/flood.git
synced 2026-05-28 17:33:15 +00:00
Merge pull request #37 from jfurrow/bug/destination-undefined
Fix destination undefined bug
This commit is contained in:
@@ -8,6 +8,7 @@ import Close from '../icons/Close';
|
||||
import File from '../icons/File';
|
||||
import Files from '../icons/Files';
|
||||
import ModalActions from './ModalActions';
|
||||
import SettingsStore from '../../stores/SettingsStore';
|
||||
import TorrentActions from '../../actions/TorrentActions';
|
||||
|
||||
const METHODS_TO_BIND = [
|
||||
@@ -23,6 +24,7 @@ export default class AddTorrentsByFile extends React.Component {
|
||||
super();
|
||||
|
||||
this.state = {
|
||||
destination: SettingsStore.getFloodSettings('torrentDestination'),
|
||||
isAddingTorrents: false,
|
||||
files: null
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
|
||||
import AddTorrentsActions from './AddTorrentsActions';
|
||||
import AddTorrentsDestination from './AddTorrentsDestination';
|
||||
import SettingsStore from '../../stores/SettingsStore';
|
||||
import TextboxRepeater from '../forms/TextboxRepeater';
|
||||
import TorrentActions from '../../actions/TorrentActions';
|
||||
|
||||
@@ -20,7 +21,7 @@ export default class AddTorrentsByURL extends React.Component {
|
||||
|
||||
this.state = {
|
||||
addTorrentsError: null,
|
||||
destination: '',
|
||||
destination: SettingsStore.getFloodSettings('torrentDestination'),
|
||||
isAddingTorrents: false,
|
||||
urlTextboxes: [{value: ''}],
|
||||
startTorrents: true
|
||||
@@ -34,6 +35,7 @@ export default class AddTorrentsByURL extends React.Component {
|
||||
handleAddTorrents() {
|
||||
this.setState({isAddingTorrents: true});
|
||||
let torrentURLs = _.map(this.state.urlTextboxes, 'value');
|
||||
|
||||
TorrentActions.addTorrentsByUrls({
|
||||
urls: torrentURLs,
|
||||
destination: this.state.destination,
|
||||
|
||||
Reference in New Issue
Block a user