diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index a5ce3628e3..a493810c52 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -28,6 +28,7 @@ import AppPermission from './AppPermission'; import AppWarning from './AppWarning'; import MessageSpinner from './MessageSpinner'; import WidgetUtils from '../../../WidgetUtils'; +import dis from '../../../dispatcher'; const ALLOWED_APP_URL_SCHEMES = ['https:', 'http:']; const betaHelpMsg = 'This feature is currently experimental and is intended for beta testing only'; @@ -187,6 +188,21 @@ export default React.createClass({ return appTileName; }, + onClickMenuBar: function(ev) { + ev.preventDefault(); + + // Ignore clicks on menu bar children + if (ev.target !== this.refs.menu_bar) { + return; + } + + // Toggle the view state of the apps drawer + dis.dispatch({ + action: 'appsDrawer', + show: !this.props.show, + }); + }, + render: function() { let appTileBody; @@ -223,7 +239,7 @@ export default React.createClass({ /> ); - } else { + } else if (this.props.show) { appTileBody = (