mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Add MatrixChat.onNewVersion to trigger the new version bar
This commit is contained in:
parent
9468ff63ff
commit
7bdd9f57a5
@ -804,6 +804,12 @@ module.exports = React.createClass({
|
||||
this.showScreen("settings");
|
||||
},
|
||||
|
||||
onNewVersion: function(current, latest) {
|
||||
this.setState({
|
||||
hasNewVersion: true
|
||||
});
|
||||
},
|
||||
|
||||
updateFavicon: function() {
|
||||
var notifCount = 0;
|
||||
|
||||
@ -851,6 +857,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
|
||||
@ -920,6 +927,19 @@ module.exports = React.createClass({
|
||||
</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 {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user