Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 502a048

Browse files
authored
Merge pull request #1327 from matrix-org/matthew/multiple-widgets
Matthew/multiple widgets
2 parents a0fe3d1 + a69cc91 commit 502a048

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/ScalarAuthClient.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ class ScalarAuthClient {
7676
return defer.promise;
7777
}
7878

79-
getScalarInterfaceUrlForRoom(roomId, screen) {
79+
getScalarInterfaceUrlForRoom(roomId, screen, id) {
8080
var url = SdkConfig.get().integrations_ui_url;
8181
url += "?scalar_token=" + encodeURIComponent(this.scalarToken);
8282
url += "&room_id=" + encodeURIComponent(roomId);
83+
if (id) {
84+
url += '&integ_id=' + encodeURIComponent(id);
85+
}
8386
if (screen) {
8487
url += '&screen=' + encodeURIComponent(screen);
8588
}

src/components/views/elements/AppTile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ export default React.createClass({
127127
_onEditClick: function(e) {
128128
console.log("Edit widget ID ", this.props.id);
129129
const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager");
130-
const src = this._scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId, 'type_' + this.props.type);
130+
const src = this._scalarClient.getScalarInterfaceUrlForRoom(
131+
this.props.room.roomId, 'type_' + this.props.type, this.props.id);
131132
Modal.createTrackedDialog('Integrations Manager', '', IntegrationsManager, {
132133
src: src,
133134
}, "mx_IntegrationsManager");

src/components/views/rooms/AuxPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ module.exports = React.createClass({
139139
}
140140

141141
return (
142-
<div className={ appsDrawer ? "mx_RoomView_auxPanel mx_RoomView_auxPanel_apps" : "mx_RoomView_auxPanel" } style={{maxHeight: this.props.maxHeight}} >
142+
<div className="mx_RoomView_auxPanel" style={{maxHeight: this.props.maxHeight}} >
143143
{ appsDrawer }
144144
{ fileDropTarget }
145145
{ callView }

0 commit comments

Comments
 (0)