From 38f45bc40d6a247fcb914ffb7e40594d4d1909db Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 16 Aug 2017 18:19:12 +0100 Subject: [PATCH] [WIP] app tile click to hide app bodies --- src/components/views/elements/AppTile.js | 13 ++++++++++-- src/components/views/rooms/AppsDrawer.js | 25 ++++++++++++++++-------- src/components/views/rooms/AuxPanel.js | 6 ++++-- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index a78b802ad7..dfbb39cb23 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'; @@ -182,6 +183,14 @@ export default React.createClass({ return appTileName; }, + onClickMenuBar: function(e) { + e.preventDefault(); + dis.dispatch({ + action: 'appsDrawer', + show: !this.props.show, + }); + }, + render: function() { let appTileBody; @@ -218,7 +227,7 @@ export default React.createClass({ /> ); - } else { + } else if (this.props.show) { appTileBody = (