tweak roomheader layout when editing

This commit is contained in:
Matthew Hodgson 2016-01-15 15:23:41 +00:00
parent b8afccd445
commit aefecfc645
2 changed files with 6 additions and 4 deletions

View file

@ -213,7 +213,7 @@ module.exports = React.createClass({
if (this.props.room) {
if (this.props.editing) {
roomAvatar = (
<div onClick={ this.onAvatarPickerClick }>
<div className="mx_RoomHeader_avatarPicker" onClick={ this.onAvatarPickerClick }>
<ChangeAvatar room={this.props.room} showUploadSection={false} width={48} height={48} />
<div className="mx_RoomHeader_avatarPicker_edit">
<label htmlFor="avatarInput" ref="file_label">
@ -228,7 +228,9 @@ module.exports = React.createClass({
}
else {
roomAvatar = (
<div onClick={this.props.onSettingsClick}>
<RoomAvatar room={this.props.room} width="48" height="48"/>
</div>
);
}
}
@ -279,7 +281,7 @@ module.exports = React.createClass({
}
return (
<div className="mx_RoomHeader">
<div className={ "mx_RoomHeader " + (this.props.editing ? "mx_RoomHeader_editing" : "") }>
{ header }
</div>
);

View file

@ -39,7 +39,7 @@ module.exports = React.createClass({
getDefaultProps: function() {
return {
showUploadSection: true,
className: "mx_Dialog_content", // FIXME - shouldn't be this by default
className: "",
width: 80,
height: 80,
};