From bf055688b798257b79fdfa15a5629671f60ace47 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 31 Mar 2016 16:35:38 +0100 Subject: [PATCH 1/3] Switch js-sdk and react-sdk back to develop --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 78ad8993..223672b8 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.0.0-beta.4", - "matrix-js-sdk": "^0.5.1", - "matrix-react-sdk": "^0.4.0", + "matrix-js-sdk": "matrix-org/matrix-js-sdk#develop", + "matrix-react-sdk": "matrix-org/matrix-react-sdk#develop", "modernizr": "^3.1.0", "q": "^1.4.1", "react": "^0.14.2", From d7157696f44149701ef9e01e0a9a8d2b3e99cec8 Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Fri, 1 Apr 2016 06:22:13 +0530 Subject: [PATCH 2/3] =?UTF-8?q?styling=20for=20emojione=20emojis=20?= =?UTF-8?q?=F0=9F=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/skins/vector/css/common.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/skins/vector/css/common.css b/src/skins/vector/css/common.css index 9a8e80a8..c18d05e0 100644 --- a/src/skins/vector/css/common.css +++ b/src/skins/vector/css/common.css @@ -214,3 +214,8 @@ input[type=text]:focus, textarea:focus { color: #454545; background-color: #fff; } + +.emojione { + height: 1em; + vertical-align: middle; +} From cf17ea62540f44baea44f333c04bf89d628a80ec Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Sun, 3 Apr 2016 00:53:17 +0530 Subject: [PATCH 3/3] Show full-size avatar on MemberInfo avatar click fixes vector-im/vector-web#65 --- src/components/views/elements/ImageView.js | 47 +++++++++++++++---- .../views/rooms/MemberInfo.css | 8 ++++ 2 files changed, 46 insertions(+), 9 deletions(-) diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index ef00b387..db23e91b 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -27,7 +27,8 @@ module.exports = React.createClass({ displayName: 'ImageView', propTypes: { - onFinished: React.PropTypes.func.isRequired + onFinished: React.PropTypes.func.isRequired, + name: React.PropTypes.string }, // XXX: keyboard shortcuts for managing dialogs should be done by the modal @@ -65,6 +66,20 @@ module.exports = React.createClass({ }); }, + getName: function () { + var name; + + if(this.props.name) { + name = this.props.name; + } else if(this.props.mxEvent) { + name = props.mxEvent.getContent().body; + } else { + name = null; + } + + return name; + }, + render: function() { /* @@ -106,10 +121,28 @@ module.exports = React.createClass({ } var size; - if (this.props.mxEvent.getContent().info && this.props.mxEvent.getContent().info.size) { + if (this.props.mxEvent && + this.props.mxEvent.getContent().info && + this.props.mxEvent.getContent().info.size) { size = filesize(this.props.mxEvent.getContent().info.size); } + var showEventMeta = !!this.props.mxEvent; + + var eventMeta; + if(showEventMeta) { + eventMeta = (
+ Uploaded on { DateUtils.formatDate(new Date(this.props.mxEvent.getTs())) } by { this.props.mxEvent.getSender() } +
); + } + + var eventRedact; + if(showEventMeta) { + eventRedact = (
+ Redact +
); + } + return (
@@ -122,11 +155,9 @@ module.exports = React.createClass({
- { this.props.mxEvent.getContent().body } -
-
- Uploaded on { DateUtils.formatDate(new Date(this.props.mxEvent.getTs())) } by { this.props.mxEvent.getSender() } + { this.getName() }
+ { eventMeta } -
- Redact -
+ { eventRedact }
diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberInfo.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberInfo.css index 6ff57ba7..e6a340df 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberInfo.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/MemberInfo.css @@ -32,6 +32,14 @@ limitations under the License. clear: both; } +.mx_MemberInfo_avatar .mx_BaseAvatar { + cursor: not-allowed; +} + +.mx_MemberInfo_avatar .mx_BaseAvatar.mx_BaseAvatar_image { + cursor: pointer; +} + .mx_MemberInfo_profile { margin-bottom: 16px; }