mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
improve lipstick and support scalar logout
This commit is contained in:
parent
4720da3f8e
commit
af230b5fa8
@ -19,6 +19,7 @@ limitations under the License.
|
|||||||
var React = require('react');
|
var React = require('react');
|
||||||
var sdk = require('matrix-react-sdk');
|
var sdk = require('matrix-react-sdk');
|
||||||
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
||||||
|
var dis = require('matrix-react-sdk/lib/dispatcher');
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'IntegrationsManager',
|
displayName: 'IntegrationsManager',
|
||||||
@ -31,11 +32,13 @@ module.exports = React.createClass({
|
|||||||
// XXX: keyboard shortcuts for managing dialogs should be done by the modal
|
// XXX: keyboard shortcuts for managing dialogs should be done by the modal
|
||||||
// dialog base class somehow, surely...
|
// dialog base class somehow, surely...
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
|
this.dispatcherRef = dis.register(this.onAction);
|
||||||
document.addEventListener("keydown", this.onKeyDown);
|
document.addEventListener("keydown", this.onKeyDown);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
document.removeEventListener("keydown", this.onKeyDown);
|
document.removeEventListener("keydown", this.onKeyDown);
|
||||||
|
dis.unregister(this.dispatcherRef);
|
||||||
},
|
},
|
||||||
|
|
||||||
onKeyDown: function(ev) {
|
onKeyDown: function(ev) {
|
||||||
@ -46,11 +49,15 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onAction: function(payload) {
|
||||||
|
if (payload.action === 'close_scalar') {
|
||||||
|
this.props.onFinished();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
<div className="mx_IntegrationsManager">
|
|
||||||
<iframe src={ this.props.src }></iframe>
|
<iframe src={ this.props.src }></iframe>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -14,20 +14,18 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.mx_IntegrationsManager {
|
.mx_IntegrationsManager .mx_Dialog {
|
||||||
display: -webkit-flex;
|
width: 60%;
|
||||||
display: flex;
|
height: 70%;
|
||||||
width: 100%;
|
overflow: hidden;
|
||||||
height: 100%;
|
padding: 0px;
|
||||||
-webkit-align-items: center;
|
max-width: initial;
|
||||||
align-items: center;
|
max-height: initial;
|
||||||
justify-content: center;
|
|
||||||
-webkit-justify-content: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_IntegrationsManager iframe {
|
.mx_IntegrationsManager iframe {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
width: 720px;
|
width: 100%;
|
||||||
height: 512px;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user