diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index fb6d36ce35..a46efc8025 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -804,6 +804,13 @@ module.exports = React.createClass({ this.showScreen("settings"); }, + onVersion: function(current, latest) { + this.setState({ + version: current, + hasNewVersion: current !== latest + }); + }, + updateFavicon: function() { var notifCount = 0; @@ -851,6 +858,7 @@ module.exports = React.createClass({ var RoomDirectory = sdk.getComponent('structures.RoomDirectory'); var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar'); var GuestWarningBar = sdk.getComponent('globals.GuestWarningBar'); + var NewVersionBar = sdk.getComponent('globals.NewVersionBar'); var ForgotPassword = sdk.getComponent('structures.login.ForgotPassword'); // needs to be before normal PageTypes as you are logged in technically @@ -880,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: @@ -920,6 +928,19 @@ module.exports = React.createClass({ ); + } else if (this.state.hasNewVersion) { + return ( +
+ +
+ +
+ {page_element} +
+ {right_panel} +
+
+ ); } else { return ( 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}