From 880e7149f345decd0f2c9ded04b3565ccfdfda4e Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Wed, 14 Jun 2017 13:05:43 +0200 Subject: [PATCH] ModularWidgets: Add a quick VR demo widget --- src/components/structures/ModularWidgets.js | 6 ++++++ src/components/views/rooms/AppsDrawer.js | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/src/components/structures/ModularWidgets.js b/src/components/structures/ModularWidgets.js index b459241948..314d273103 100644 --- a/src/components/structures/ModularWidgets.js +++ b/src/components/structures/ModularWidgets.js @@ -18,6 +18,12 @@ class ModularWidgets { name: 'jitsi', description: 'Jitsi video conference', }, + { + type: 'vrdemo', + icon: 'http://localhost:8000/static/jitsi.png', + name: 'vrdemo', + description: 'Matrix VR Demo', + }, { type: 'custom', icon: 'http://localhost:8000/static/blocks.png', diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index 816b813da1..1d738fb9d2 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -65,6 +65,9 @@ module.exports = React.createClass({ app.name += ' - ' + app.data.confId; break; } + case 'vrdemo': + app.name = 'Matrix VR Demo'; + break; } return app; @@ -149,6 +152,12 @@ module.exports = React.createClass({ }, }; break; + case 'vrdemo': + appsStateEvent.vrDemo = { + type: type, + url: 'http://localhost:8000/vrdemo.html', + }; + break; case 'custom': appsStateEvent.custom = { type: type,