Static widget config per room
This commit is contained in:
parent
143f68ec56
commit
0e7bb6791f
1 changed files with 24 additions and 12 deletions
|
@ -21,6 +21,22 @@ const AddAppDialog = require('../dialogs/AddAppDialog');
|
||||||
const AppTile = require('../elements/AppTile');
|
const AppTile = require('../elements/AppTile');
|
||||||
const Modal = require("../../../Modal");
|
const Modal = require("../../../Modal");
|
||||||
|
|
||||||
|
// FIXME -- Hard coded widget config
|
||||||
|
const roomWidgetConfig = {
|
||||||
|
'!IAkkwswSrOSzPRWksX:matrix.org': [
|
||||||
|
{
|
||||||
|
id: "youtube",
|
||||||
|
url: "https://www.youtube.com/embed/ZJy1ajvMU1k?controls=0&enablejsapi=1&iv_load_policy=3&modestbranding=1&playsinline=1",
|
||||||
|
name: "Live stream - Boeuf Bourguignon",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "recipie",
|
||||||
|
url: "http://localhost:8000/recepie.html",
|
||||||
|
name: "Ingredients - Boeuf Bourguignon",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'AppsDrawer',
|
displayName: 'AppsDrawer',
|
||||||
|
|
||||||
|
@ -31,19 +47,15 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
|
for (const key in roomWidgetConfig) {
|
||||||
|
if(key == this.props.room.roomId) {
|
||||||
|
return {
|
||||||
|
apps: roomWidgetConfig[key],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
apps: [
|
apps: [],
|
||||||
{
|
|
||||||
id: "youtube",
|
|
||||||
url: "https://www.youtube.com/embed/ZJy1ajvMU1k?controls=0&enablejsapi=1&iv_load_policy=3&modestbranding=1&playsinline=1",
|
|
||||||
name: "Live stream - Boeuf Bourguignon",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "recipie",
|
|
||||||
url: "http://localhost:8000/recepie.html",
|
|
||||||
name: "Ingredients - Boeuf Bourguignon",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue