mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
Merge pull request #1194 from matrix-org/rxl881/apps
Use app ID for element key and pass screen parameter to scalar.
This commit is contained in:
commit
e970b68859
@ -76,10 +76,13 @@ class ScalarAuthClient {
|
|||||||
return defer.promise;
|
return defer.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
getScalarInterfaceUrlForRoom(roomId) {
|
getScalarInterfaceUrlForRoom(roomId, screen) {
|
||||||
var url = SdkConfig.get().integrations_ui_url;
|
var url = SdkConfig.get().integrations_ui_url;
|
||||||
url += "?scalar_token=" + encodeURIComponent(this.scalarToken);
|
url += "?scalar_token=" + encodeURIComponent(this.scalarToken);
|
||||||
url += "&room_id=" + encodeURIComponent(roomId);
|
url += "&room_id=" + encodeURIComponent(roomId);
|
||||||
|
if (screen) {
|
||||||
|
url += '&screen=' + encodeURIComponent(screen);
|
||||||
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,4 +92,3 @@ class ScalarAuthClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = ScalarAuthClient;
|
module.exports = ScalarAuthClient;
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager");
|
const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager");
|
||||||
const src = (this.scalarClient !== null && this.scalarClient.hasCredentials()) ?
|
const src = (this.scalarClient !== null && this.scalarClient.hasCredentials()) ?
|
||||||
this.scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId) :
|
this.scalarClient.getScalarInterfaceUrlForRoom(this.props.room.roomId, 'add_integ') :
|
||||||
null;
|
null;
|
||||||
Modal.createDialog(IntegrationsManager, {
|
Modal.createDialog(IntegrationsManager, {
|
||||||
src: src,
|
src: src,
|
||||||
@ -187,7 +187,7 @@ module.exports = React.createClass({
|
|||||||
const apps = this.state.apps.map(
|
const apps = this.state.apps.map(
|
||||||
(app, index, arr) => {
|
(app, index, arr) => {
|
||||||
return <AppTile
|
return <AppTile
|
||||||
key={app.name}
|
key={app.id}
|
||||||
id={app.id}
|
id={app.id}
|
||||||
url={app.url}
|
url={app.url}
|
||||||
name={app.name}
|
name={app.name}
|
||||||
|
Loading…
Reference in New Issue
Block a user