Skip to content

Commit af230b5

Browse files
committed
improve lipstick and support scalar logout
1 parent 4720da3 commit af230b5

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

src/components/views/settings/IntegrationsManager.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ limitations under the License.
1919
var React = require('react');
2020
var sdk = require('matrix-react-sdk');
2121
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
22+
var dis = require('matrix-react-sdk/lib/dispatcher');
2223

2324
module.exports = React.createClass({
2425
displayName: 'IntegrationsManager',
@@ -31,11 +32,13 @@ module.exports = React.createClass({
3132
// XXX: keyboard shortcuts for managing dialogs should be done by the modal
3233
// dialog base class somehow, surely...
3334
componentDidMount: function() {
35+
this.dispatcherRef = dis.register(this.onAction);
3436
document.addEventListener("keydown", this.onKeyDown);
3537
},
3638

3739
componentWillUnmount: function() {
3840
document.removeEventListener("keydown", this.onKeyDown);
41+
dis.unregister(this.dispatcherRef);
3942
},
4043

4144
onKeyDown: function(ev) {
@@ -46,11 +49,15 @@ module.exports = React.createClass({
4649
}
4750
},
4851

52+
onAction: function(payload) {
53+
if (payload.action === 'close_scalar') {
54+
this.props.onFinished();
55+
}
56+
},
57+
4958
render: function() {
5059
return (
51-
<div className="mx_IntegrationsManager">
52-
<iframe src={ this.props.src }></iframe>
53-
</div>
60+
<iframe src={ this.props.src }></iframe>
5461
);
5562
}
5663
});

src/skins/vector/css/matrix-react-sdk/views/settings/IntegrationsManager.css

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,18 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
.mx_IntegrationsManager {
18-
display: -webkit-flex;
19-
display: flex;
20-
width: 100%;
21-
height: 100%;
22-
-webkit-align-items: center;
23-
align-items: center;
24-
justify-content: center;
25-
-webkit-justify-content: center;
17+
.mx_IntegrationsManager .mx_Dialog {
18+
width: 60%;
19+
height: 70%;
20+
overflow: hidden;
21+
padding: 0px;
22+
max-width: initial;
23+
max-height: initial;
2624
}
2725

2826
.mx_IntegrationsManager iframe {
2927
background-color: #fff;
3028
border: 0px;
31-
width: 720px;
32-
height: 512px;
29+
width: 100%;
30+
height: 100%;
3331
}

0 commit comments

Comments
 (0)