diff --git a/src/ScalarAuthClient.js b/src/ScalarAuthClient.js index b1d17b93a9..dddd01b9f9 100644 --- a/src/ScalarAuthClient.js +++ b/src/ScalarAuthClient.js @@ -76,10 +76,13 @@ class ScalarAuthClient { return defer.promise; } - getScalarInterfaceUrlForRoom(roomId, screen) { + getScalarInterfaceUrlForRoom(roomId, screen, id) { var url = SdkConfig.get().integrations_ui_url; url += "?scalar_token=" + encodeURIComponent(this.scalarToken); url += "&room_id=" + encodeURIComponent(roomId); + if (id) { + url += '&integ_id=' + id; + } if (screen) { url += '&screen=' + encodeURIComponent(screen); } diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index a78b802ad7..72cba73075 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -122,7 +122,7 @@ export default React.createClass({ _onEditClick: function(e) { console.log("Edit widget ID ", this.props.id); const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager"); - const src = this._scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId, 'type_' + this.props.type); + const src = this._scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId, 'type_' + this.props.type, this.props.id); Modal.createTrackedDialog('Integrations Manager', '', IntegrationsManager, { src: src, }, "mx_IntegrationsManager"); diff --git a/src/components/views/rooms/AuxPanel.js b/src/components/views/rooms/AuxPanel.js index 8fa805d3cf..69fe209580 100644 --- a/src/components/views/rooms/AuxPanel.js +++ b/src/components/views/rooms/AuxPanel.js @@ -129,7 +129,10 @@ module.exports = React.createClass({ ); let appsDrawer = null; + let appCount = 0; if(UserSettingsStore.isFeatureEnabled('matrix_apps') && this.props.showApps) { + const appsStateEvents = this.props.room.currentState.getStateEvents('im.vector.modular.widgets'); + if (appsStateEvents) appCount = appsStateEvents.length; appsDrawer = +
{ appsDrawer } { fileDropTarget } { callView }