Improve notifications

This commit is contained in:
John Furrow
2016-05-21 14:36:12 -07:00
parent 7748660783
commit e8515ac16b
13 changed files with 252 additions and 50 deletions
@@ -8,7 +8,6 @@ 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 = [
@@ -75,7 +74,7 @@ export default class AddTorrentsByFile extends React.Component {
<File />
</span>
<span className="dropzone__file__item dropzone__file__item--file-name">
{file.name}{file.name}
{file.name}
</span>
<span className="dropzone__file__item dropzone__file__item--icon dropzone__file__item--remove-icon" onClick={this.handleFileRemove.bind(this, index)}>
<Close />
@@ -106,8 +105,6 @@ export default class AddTorrentsByFile extends React.Component {
return;
}
SettingsStore.saveSettings({id: 'torrentDestination', data: this.state.destination});
this.setState({isAddingTorrents: true});
let fileData = new FormData();
@@ -2,7 +2,6 @@ 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';
@@ -21,7 +20,7 @@ export default class AddTorrentsByURL extends React.Component {
this.state = {
addTorrentsError: null,
destination: null,
destination: '',
isAddingTorrents: false,
urlTextboxes: [{value: ''}],
startTorrents: true
@@ -40,7 +39,6 @@ export default class AddTorrentsByURL extends React.Component {
destination: this.state.destination,
start: this.state.startTorrents
});
SettingsStore.saveSettings({id: 'torrentDestination', data: this.state.destination});
}
handleDestinationChange(destination) {
@@ -11,7 +11,7 @@ export default class AddTorrentsDestination extends React.Component {
super();
this.state = {
destination: null
destination: ''
};
METHODS_TO_BIND.forEach((method) => {
@@ -20,7 +20,7 @@ export default class AddTorrentsDestination extends React.Component {
}
componentWillMount() {
let destination = SettingsStore.getSettings('torrentDestination');
let destination = SettingsStore.getSettings('torrentDestination') || '';
if (this.props.suggested) {
destination = this.props.suggested;
}