From d7a851a3537936a437acc7f6462e8590f06a1aa8 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 17 Mar 2016 16:28:49 +0000 Subject: [PATCH] make senderprofiles clickable --- src/components/views/messages/SenderProfile.js | 14 +++++++++++++- .../css/matrix-react-sdk/views/rooms/EventTile.css | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/views/messages/SenderProfile.js b/src/components/views/messages/SenderProfile.js index 9455cacb4b..6f9e74b3e5 100644 --- a/src/components/views/messages/SenderProfile.js +++ b/src/components/views/messages/SenderProfile.js @@ -21,6 +21,18 @@ var React = require('react'); module.exports = React.createClass({ displayName: 'SenderProfile', + propTypes: { + mxEvent: React.PropTypes.object.isRequired, // event whose sender we're showing + aux: React.PropTypes.object, // stuff to go after the sender name, if anything + onClick: React.PropTypes.func, + }, + + getDefaultProps: function() { + return { + onClick: function() {}, + } + }, + render: function() { var mxEvent = this.props.mxEvent; var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender(); @@ -30,7 +42,7 @@ module.exports = React.createClass({ name = ''; // emote message must include the name so don't duplicate it } return ( - + {name} { this.props.aux } ); diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css index feaba113dc..8feab9de72 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css @@ -43,6 +43,7 @@ limitations under the License. margin-bottom: 4px; display: block; overflow-y: hidden; + cursor: pointer; } .mx_EventTile .mx_MessageTimestamp {