Joining a room can take a while. Show a spinner otherwise we'll end up in multiple join city.
This commit is contained in:
parent
b5f7bd6cfb
commit
af0597e0c8
2 changed files with 21 additions and 4 deletions
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var sdk = require('../../../index');
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'RoomPreviewBar',
|
||||
|
@ -27,6 +28,7 @@ module.exports = React.createClass({
|
|||
inviterName: React.PropTypes.string,
|
||||
canJoin: React.PropTypes.bool,
|
||||
canPreview: React.PropTypes.bool,
|
||||
spinner: React.PropTypes.bool,
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
|
@ -40,6 +42,13 @@ module.exports = React.createClass({
|
|||
render: function() {
|
||||
var joinBlock, previewBlock;
|
||||
|
||||
if (this.props.spinner) {
|
||||
var Spinner = sdk.getComponent("elements.Spinner");
|
||||
return (<div className="mx_RoomPreviewBar">
|
||||
<Spinner />
|
||||
</div>);
|
||||
}
|
||||
|
||||
if (this.props.inviterName) {
|
||||
joinBlock = (
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue