Skip to content

Commit

Permalink
Add spinner for inviting. Fixes #13.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Oct 6, 2015
1 parent 85636cc commit 807e947
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/skins/vector/views/organisms/MemberList.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ limitations under the License.

var React = require('react');
var classNames = require('classnames');
var Loader = require('react-loader');

var MemberListController = require('matrix-react-sdk/lib/controllers/organisms/MemberList')

Expand Down Expand Up @@ -69,14 +70,20 @@ module.exports = React.createClass({
});

var EditableText = sdk.getComponent("atoms.EditableText");
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}/>
if (this.state.inviting) {
return (
<Loader />
);
} 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>
);
);
}
},

render: function() {
Expand Down

0 comments on commit 807e947

Please sign in to comment.