put integrations manager into a modal
This commit is contained in:
parent
be5f29d03b
commit
c38c57df1e
1 changed files with 16 additions and 4 deletions
|
@ -388,6 +388,14 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onManageIntegrations(ev) {
|
||||||
|
ev.preventDefault();
|
||||||
|
var IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager");
|
||||||
|
Modal.createDialog(IntegrationsManager, {
|
||||||
|
src: this.state.scalar_token ? this.getScalarInterfaceUrl() : null
|
||||||
|
}, "");
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
// TODO: go through greying out things you don't have permission to change
|
// TODO: go through greying out things you don't have permission to change
|
||||||
// (or turning them into informative stuff)
|
// (or turning them into informative stuff)
|
||||||
|
@ -565,7 +573,11 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
var integrations_section;
|
var integrations_section;
|
||||||
if (this.state.scalar_token) {
|
if (this.state.scalar_token) {
|
||||||
integrations_section = <iframe src={this.getScalarInterfaceUrl()} width={640} height={600}></iframe>;
|
integrations_section = (
|
||||||
|
<div className="mx_RoomSettings_settings">
|
||||||
|
<a href="#" onClick={ this.onManageIntegrations }>Manage integrations</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
integrations_section = <Loader />;
|
integrations_section = <Loader />;
|
||||||
}
|
}
|
||||||
|
@ -658,6 +670,9 @@ module.exports = React.createClass({
|
||||||
<ColorSettings ref="color_settings" room={this.props.room} />
|
<ColorSettings ref="color_settings" room={this.props.room} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h3>Integrations</h3>
|
||||||
|
{ integrations_section }
|
||||||
|
|
||||||
<a id="addresses"/>
|
<a id="addresses"/>
|
||||||
|
|
||||||
<AliasSettings ref="alias_settings"
|
<AliasSettings ref="alias_settings"
|
||||||
|
@ -718,9 +733,6 @@ module.exports = React.createClass({
|
||||||
<div className="mx_RoomSettings_settings">
|
<div className="mx_RoomSettings_settings">
|
||||||
This room's internal ID is <code>{ this.props.room.roomId }</code>
|
This room's internal ID is <code>{ this.props.room.roomId }</code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>Integrations</h3>
|
|
||||||
{ integrations_section }
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue