Add spinner for inviting. Fixes #13.

This commit is contained in:
David Baker 2015-10-06 14:12:45 +01:00
parent 85636ccdad
commit 807e947146

View File

@ -18,6 +18,7 @@ limitations under the License.
var React = require('react'); var React = require('react');
var classNames = require('classnames'); var classNames = require('classnames');
var Loader = require('react-loader');
var MemberListController = require('matrix-react-sdk/lib/controllers/organisms/MemberList') var MemberListController = require('matrix-react-sdk/lib/controllers/organisms/MemberList')
@ -69,14 +70,20 @@ module.exports = React.createClass({
}); });
var EditableText = sdk.getComponent("atoms.EditableText"); var EditableText = sdk.getComponent("atoms.EditableText");
return ( if (this.state.inviting) {
<div className={ classes } onClick={ this.onClickInvite } > return (
<div className="mx_MemberTile_avatar"><img src="img/create-big.png" width="40" height="40" alt=""/></div> <Loader />
<div className="mx_MemberTile_name"> );
<EditableText ref="invite" label="Invite" placeHolder="@user:domain.com" initialValue="" onValueChanged={this.onPopulateInvite}/> } else {
return (
<div className={ classes } onClick={ this.onClickInvite } >
<div className="mx_MemberTile_avatar"><img src="img/create-big.png" width="40" height="40" alt=""/></div>
<div className="mx_MemberTile_name">
<EditableText ref="invite" label="Invite" placeHolder="@user:domain.com" initialValue="" onValueChanged={this.onPopulateInvite}/>
</div>
</div> </div>
</div> );
); }
}, },
render: function() { render: function() {