Port AppTile (widgets) over to new integration manager dialog props
This commit is contained in:
parent
f699fed720
commit
d2d0cb2e9e
1 changed files with 6 additions and 12 deletions
|
@ -240,19 +240,13 @@ export default class AppTile extends React.Component {
|
||||||
if (this.props.onEditClick) {
|
if (this.props.onEditClick) {
|
||||||
this.props.onEditClick();
|
this.props.onEditClick();
|
||||||
} else {
|
} else {
|
||||||
|
// The dialog handles scalar auth for us
|
||||||
const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager");
|
const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager");
|
||||||
this._scalarClient.connect().done(() => {
|
|
||||||
const src = this._scalarClient.getScalarInterfaceUrlForRoom(
|
|
||||||
this.props.room, 'type_' + this.props.type, this.props.id);
|
|
||||||
Modal.createTrackedDialog('Integrations Manager', '', IntegrationsManager, {
|
Modal.createTrackedDialog('Integrations Manager', '', IntegrationsManager, {
|
||||||
src: src,
|
room: this.props.room,
|
||||||
|
screen: 'type_' + this.props.type,
|
||||||
|
integrationId: this.props.id
|
||||||
}, "mx_IntegrationsManager");
|
}, "mx_IntegrationsManager");
|
||||||
}, (err) => {
|
|
||||||
this.setState({
|
|
||||||
error: err.message,
|
|
||||||
});
|
|
||||||
console.error('Error ensuring a valid scalar_token exists', err);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue