From 31e09ebe637d2d76e8f5b43825aca30f8338fb8c Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Sun, 3 Apr 2016 00:54:23 +0530 Subject: [PATCH] Show full-size avatar on MemberInfo avatar click fixes vector-im/vector-web#65 --- src/components/views/rooms/MemberInfo.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 94bd5d6b8f..52313430d4 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -448,6 +448,20 @@ module.exports = React.createClass({ }); }, + onMemberAvatarClick: function () { + var avatarUrl = this.props.member.user.avatarUrl; + if(!avatarUrl) return; + + var httpUrl = MatrixClientPeg.get().mxcUrlToHttp(avatarUrl); + var ImageView = sdk.getComponent("elements.ImageView"); + var params = { + src: httpUrl, + name: this.props.member.name + }; + + Modal.createDialog(ImageView, params, "mx_Dialog_lightbox"); + }, + render: function() { var startChat, kickButton, banButton, muteButton, giveModButton, spinner; if (this.props.member.userId !== MatrixClientPeg.get().credentials.userId) { @@ -508,7 +522,7 @@ module.exports = React.createClass({
- +

{ this.props.member.name }