From 8b96af4ccbef2660be629218748f4ddabe9ae415 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 3 Feb 2016 16:51:53 +0000 Subject: [PATCH] Display the version in UserSettings. Change MatrixChat.onNewVersion to onVersion --- src/components/structures/MatrixChat.js | 7 ++++--- src/components/structures/UserSettings.js | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 677d69de6d..a46efc8025 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -804,9 +804,10 @@ module.exports = React.createClass({ this.showScreen("settings"); }, - onNewVersion: function(current, latest) { + onVersion: function(current, latest) { this.setState({ - hasNewVersion: true + version: current, + hasNewVersion: current !== latest }); }, @@ -887,7 +888,7 @@ module.exports = React.createClass({ right_panel = break; case this.PageTypes.UserSettings: - page_element = + page_element = right_panel = break; case this.PageTypes.CreateRoom: diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 9bf0793fc3..8f7e138bc0 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -30,6 +30,7 @@ module.exports = React.createClass({ displayName: 'UserSettings', propTypes: { + version: React.PropTypes.string, onClose: React.PropTypes.func }, @@ -377,6 +378,8 @@ module.exports = React.createClass({
Version {this.state.clientVersion} +
+ {this.props.version}