diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-01-28 11:44:20 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-28 11:44:20 +0100 |
commit | 9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854 (patch) | |
tree | f31a50459ca9021f1d7ca03f6c63ca95ec98c44d /src/web/js/components/Menu.react.js | |
parent | redoing UI and finishing up sidebar (diff) | |
download | newspipe-9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854.tar.gz newspipe-9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854.tar.bz2 newspipe-9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854.zip |
restoring build command
Diffstat (limited to 'src/web/js/components/Menu.react.js')
-rw-r--r-- | src/web/js/components/Menu.react.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/web/js/components/Menu.react.js b/src/web/js/components/Menu.react.js index 75255d41..f699f92e 100644 --- a/src/web/js/components/Menu.react.js +++ b/src/web/js/components/Menu.react.js @@ -20,7 +20,6 @@ var FeedItem = React.createClass({ render: function() { var icon = null; var badge_unread = null; - var style = null; if(this.props.icon_url){ icon = (<img width="16px" src={this.props.icon_url} />); } else { @@ -152,21 +151,30 @@ var MenuFilter = React.createClass({ if (this.props.feed_in_error) { error_button = ( <Button active={this.props.filter == "error"} - onMouseDown={() => MenuActions.setFilter("error")} + onMouseDown={this.setErrorFilter} bsSize="small" bsStyle="warning">Error</Button> ); } return (<ButtonGroup className="nav nav-sidebar"> <Button active={this.props.filter == "all"} - onMouseDown={() => MenuActions.setFilter("all")} + onMouseDown={this.setAllFilter} bsSize="small">All</Button> <Button active={this.props.filter == "unread"} - onMouseDown={() => MenuActions.setFilter("unread")} + onMouseDown={this.setUnreadFilter} bsSize="small">Unread</Button> {error_button} </ButtonGroup> ); }, + setAllFilter: function() { + MenuActions.setFilter("all"); + }, + setUnreadFilter: function() { + MenuActions.setFilter("unread"); + }, + setErrorFilter: function() { + MenuActions.setFilter("error"); + }, }); var Menu = React.createClass({ |