Add MatrixChat.onNewVersion to trigger the new version bar
This commit is contained in:
parent
9468ff63ff
commit
7bdd9f57a5
1 changed files with 20 additions and 0 deletions
|
@ -804,6 +804,12 @@ module.exports = React.createClass({
|
||||||
this.showScreen("settings");
|
this.showScreen("settings");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onNewVersion: function(current, latest) {
|
||||||
|
this.setState({
|
||||||
|
hasNewVersion: true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
updateFavicon: function() {
|
updateFavicon: function() {
|
||||||
var notifCount = 0;
|
var notifCount = 0;
|
||||||
|
|
||||||
|
@ -851,6 +857,7 @@ module.exports = React.createClass({
|
||||||
var RoomDirectory = sdk.getComponent('structures.RoomDirectory');
|
var RoomDirectory = sdk.getComponent('structures.RoomDirectory');
|
||||||
var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar');
|
var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar');
|
||||||
var GuestWarningBar = sdk.getComponent('globals.GuestWarningBar');
|
var GuestWarningBar = sdk.getComponent('globals.GuestWarningBar');
|
||||||
|
var NewVersionBar = sdk.getComponent('globals.NewVersionBar');
|
||||||
var ForgotPassword = sdk.getComponent('structures.login.ForgotPassword');
|
var ForgotPassword = sdk.getComponent('structures.login.ForgotPassword');
|
||||||
|
|
||||||
// needs to be before normal PageTypes as you are logged in technically
|
// needs to be before normal PageTypes as you are logged in technically
|
||||||
|
@ -920,6 +927,19 @@ module.exports = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
} else if (this.state.hasNewVersion) {
|
||||||
|
return (
|
||||||
|
<div className="mx_MatrixChat_wrapper">
|
||||||
|
<NewVersionBar />
|
||||||
|
<div className="mx_MatrixChat mx_MatrixChat_toolbarShowing">
|
||||||
|
<LeftPanel selectedRoom={this.state.currentRoom} collapsed={this.state.collapse_lhs} />
|
||||||
|
<main className="mx_MatrixChat_middlePanel">
|
||||||
|
{page_element}
|
||||||
|
</main>
|
||||||
|
{right_panel}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue