mirror of
https://github.com/zoriya/flood.git
synced 2026-06-06 03:56:42 +00:00
Adjust the modal component
This commit is contained in:
@@ -2,12 +2,12 @@ import React from 'react';
|
|||||||
|
|
||||||
import Action from '../components/action-bar/Action';
|
import Action from '../components/action-bar/Action';
|
||||||
import { addTorrent, startTorrent, stopTorrent } from '../actions/ClientActions';
|
import { addTorrent, startTorrent, stopTorrent } from '../actions/ClientActions';
|
||||||
import AddTorrent from '../components/action-bar/AddTorrent';
|
import { displayModal } from '../actions/UIActions';
|
||||||
import { setTorrentsSort } from '../actions/UIActions';
|
import { setTorrentsSort } from '../actions/UIActions';
|
||||||
import SortDropdown from '../components/action-bar/SortDropdown';
|
import SortDropdown from '../components/action-bar/SortDropdown';
|
||||||
import UIActions from '../actions/UIActions';
|
|
||||||
|
|
||||||
const methodsToBind = [
|
const methodsToBind = [
|
||||||
|
'handleAddTorrents',
|
||||||
'handleSortChange',
|
'handleSortChange',
|
||||||
'handleStart',
|
'handleStart',
|
||||||
'handleStop'
|
'handleStop'
|
||||||
@@ -27,6 +27,12 @@ export default class FilterBar extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleAddTorrents() {
|
||||||
|
this.props.dispatch(displayModal({
|
||||||
|
modal: 'add-torrents'
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
handleSortChange(sortBy) {
|
handleSortChange(sortBy) {
|
||||||
this.props.dispatch(setTorrentsSort({
|
this.props.dispatch(setTorrentsSort({
|
||||||
sortBy
|
sortBy
|
||||||
@@ -58,7 +64,8 @@ export default class FilterBar extends React.Component {
|
|||||||
clickHandler={this.handlePause} />
|
clickHandler={this.handlePause} />
|
||||||
</div>
|
</div>
|
||||||
<div className="action-bar__group action-bar__group--has-divider">
|
<div className="action-bar__group action-bar__group--has-divider">
|
||||||
<AddTorrent />
|
<Action label="Add Torrent" slug="add-torrent" icon="add"
|
||||||
|
clickHandler={this.handleAddTorrents} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user