From af230b5fa863095863110759453aa4f6f1a1e811 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 18 Sep 2016 02:57:15 +0100 Subject: [PATCH] improve lipstick and support scalar logout --- .../views/settings/IntegrationsManager.js | 13 +++++++++--- .../views/settings/IntegrationsManager.css | 20 +++++++++---------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/components/views/settings/IntegrationsManager.js b/src/components/views/settings/IntegrationsManager.js index 8db010a2..a7d15e6f 100644 --- a/src/components/views/settings/IntegrationsManager.js +++ b/src/components/views/settings/IntegrationsManager.js @@ -19,6 +19,7 @@ limitations under the License. var React = require('react'); var sdk = require('matrix-react-sdk'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); +var dis = require('matrix-react-sdk/lib/dispatcher'); module.exports = React.createClass({ displayName: 'IntegrationsManager', @@ -31,11 +32,13 @@ module.exports = React.createClass({ // XXX: keyboard shortcuts for managing dialogs should be done by the modal // dialog base class somehow, surely... componentDidMount: function() { + this.dispatcherRef = dis.register(this.onAction); document.addEventListener("keydown", this.onKeyDown); }, componentWillUnmount: function() { document.removeEventListener("keydown", this.onKeyDown); + dis.unregister(this.dispatcherRef); }, onKeyDown: function(ev) { @@ -46,11 +49,15 @@ module.exports = React.createClass({ } }, + onAction: function(payload) { + if (payload.action === 'close_scalar') { + this.props.onFinished(); + } + }, + render: function() { return ( -
- -
+ ); } }); diff --git a/src/skins/vector/css/matrix-react-sdk/views/settings/IntegrationsManager.css b/src/skins/vector/css/matrix-react-sdk/views/settings/IntegrationsManager.css index 0fa40fe1..93ee0e20 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/settings/IntegrationsManager.css +++ b/src/skins/vector/css/matrix-react-sdk/views/settings/IntegrationsManager.css @@ -14,20 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_IntegrationsManager { - display: -webkit-flex; - display: flex; - width: 100%; - height: 100%; - -webkit-align-items: center; - align-items: center; - justify-content: center; - -webkit-justify-content: center; +.mx_IntegrationsManager .mx_Dialog { + width: 60%; + height: 70%; + overflow: hidden; + padding: 0px; + max-width: initial; + max-height: initial; } .mx_IntegrationsManager iframe { background-color: #fff; border: 0px; - width: 720px; - height: 512px; + width: 100%; + height: 100%; }