POWER
|
@ -27,13 +27,24 @@ limitations under the License.
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MemberTile_avatar img {
|
.mx_MemberTile_avatarImg {
|
||||||
|
z-index: 20;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background-color: #dbdbdb;
|
background-color: #dbdbdb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_MemberTile_power {
|
||||||
|
z-index: 10;
|
||||||
|
position: absolute;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
left: -4px;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_MemberTile_name {
|
.mx_MemberTile_name {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
After Width: | Height: | Size: 88 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 558 B |
After Width: | Height: | Size: 628 B |
After Width: | Height: | Size: 674 B |
After Width: | Height: | Size: 713 B |
After Width: | Height: | Size: 782 B |
After Width: | Height: | Size: 774 B |
After Width: | Height: | Size: 835 B |
After Width: | Height: | Size: 872 B |
After Width: | Height: | Size: 931 B |
After Width: | Height: | Size: 960 B |
After Width: | Height: | Size: 232 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 304 B |
After Width: | Height: | Size: 357 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 429 B |
After Width: | Height: | Size: 476 B |
After Width: | Height: | Size: 538 B |
After Width: | Height: | Size: 573 B |
|
@ -25,9 +25,15 @@ module.exports = React.createClass({
|
||||||
displayName: 'MemberTile',
|
displayName: 'MemberTile',
|
||||||
mixins: [MemberTileController],
|
mixins: [MemberTileController],
|
||||||
render: function() {
|
render: function() {
|
||||||
|
var power;
|
||||||
|
if (this.props.member) {
|
||||||
|
var img = "/img/p/p" + Math.floor(20 * this.props.member.powerLevelNorm / 100) + ".png";
|
||||||
|
power = <img src={ img } className="mx_MemberTile_power" width="48" height="48" alt=""/>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_MemberTile">
|
<div className="mx_MemberTile">
|
||||||
<div className="mx_MemberTile_avatar"><img src={ this.props.member ? MatrixClientPeg.get().getAvatarUrlForMember(this.props.member, 40, 40, "crop") : null } width="40" height="40" alt=""/></div>
|
<div className="mx_MemberTile_avatar"><img className="mx_MemberTile_avatarImg" src={ this.props.member ? MatrixClientPeg.get().getAvatarUrlForMember(this.props.member, 40, 40, "crop") : null } width="40" height="40" alt=""/>{ power }</div>
|
||||||
<div className="mx_MemberTile_name">{this.props.member.name}</div>
|
<div className="mx_MemberTile_name">{this.props.member.name}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|