Move avatars into their own components so I can add functionality like custom default avatars and onerror sources without having to add it in 13 separate places. Add the aforementioned features.
This commit is contained in:
parent
b580fba7db
commit
fec266f1c0
20 changed files with 314 additions and 23 deletions
|
@ -20,6 +20,8 @@ var React = require('react');
|
|||
|
||||
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
||||
var MemberInfoController = require("../../../../src/controllers/molecules/MemberInfo");
|
||||
var ComponentBroker = require('../../../../src/ComponentBroker');
|
||||
var MemberAvatar = ComponentBroker.get('atoms/MemberAvatar');
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'MemberInfo',
|
||||
|
@ -96,9 +98,7 @@ module.exports = React.createClass({
|
|||
<img className="mx_MemberInfo_chevron" src="img/chevron-right.png" width="9" height="16" />
|
||||
<div className="mx_MemberInfo_shim"></div>
|
||||
<div className="mx_MemberInfo_avatar">
|
||||
<img className="mx_MemberInfo_avatarImg"
|
||||
src={ this.props.member ? MatrixClientPeg.get().getAvatarUrlForMember(this.props.member, 128, 128, "crop") : null }
|
||||
width="128" height="128" alt=""/>
|
||||
<MemberAvatar member={this.props.member} width={128} height={128} />
|
||||
</div>
|
||||
<div className="mx_MemberInfo_field">{this.props.member.userId}</div>
|
||||
{opLabel}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue