From b111579aed578dae1089c7c349a72c2a0977c551 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Mon, 22 May 2017 18:00:17 +0100 Subject: [PATCH] App tile events --- src/components/views/elements/AppTile.js | 27 ++++++++++++++++++++---- src/components/views/rooms/AppsDrawer.js | 6 +++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 66c32a16a1..72d59d0ecd 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -33,19 +33,38 @@ export default React.createClass({ }; }, + _onEditClick: function() { + console.log("Edit widget %s", this.props.id); + }, + + _onDeleteClick: function() { + console.log("Delete widget %s", this.props.id); + }, + render: function() { return (
{this.props.name} - Edit - Cancel - {/* x */} + {/* Edit widget */} + Edit + + {/* Delete widget */} + Cancel
- +
); diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index ef0cbcf2b9..1318d07d8b 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -40,9 +40,9 @@ module.exports = React.createClass({ getInitialState: function() { return { apps: [{ - id: "googleApp", - url: "http://matrix.org/grafana/dashboard/db/golang-metrics?panelId=2&fullscreen&edit&var-bucket_size=1m&var-job=riot-bot&var-handler=All&from=1495188444653&to=1495210044654", - name: "Google", + id: "riot-bot", + url: "https://matrix.org/_matrix/media/v1/thumbnail/matrix.org/LvHiqFMHWxAjFUMVCvaPbRYs?width=150&height=150", + name: "Riot-bot", }], }; },