mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
Wrangle CSS to get avatar in right place
This commit is contained in:
parent
05d1d7c82d
commit
5286ec170f
@ -198,7 +198,7 @@ module.exports = React.createClass({
|
||||
|
||||
<div className="mx_UserSettings_avatarPicker">
|
||||
<ChangeAvatar ref="changeAvatar" initialAvatarUrl={avatarUrl}
|
||||
showUploadSection={false} />
|
||||
showUploadSection={false} className="mx_UserSettings_avatarPicker_img"/>
|
||||
<div className="mx_UserSettings_avatarPicker_edit">
|
||||
<label htmlFor="avatarInput">
|
||||
<img src="img/upload.svg"
|
||||
@ -214,7 +214,7 @@ module.exports = React.createClass({
|
||||
|
||||
<div className="mx_UserSettings_section">
|
||||
<ChangePassword
|
||||
className="mx_UserSettings_profileTable"
|
||||
className="mx_UserSettings_accountTable"
|
||||
rowClassName="mx_UserSettings_profileTableRow"
|
||||
rowLabelClassName="mx_UserSettings_profileLabelCell"
|
||||
rowInputClassName="mx_UserSettings_profileInputCell"
|
||||
|
@ -24,7 +24,8 @@ module.exports = React.createClass({
|
||||
initialAvatarUrl: React.PropTypes.string,
|
||||
room: React.PropTypes.object,
|
||||
// if false, you need to call changeAvatar.onFileSelected yourself.
|
||||
showUploadSection: React.PropTypes.bool
|
||||
showUploadSection: React.PropTypes.bool,
|
||||
className: React.PropTypes.string
|
||||
},
|
||||
|
||||
Phases: {
|
||||
@ -35,7 +36,8 @@ module.exports = React.createClass({
|
||||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
showUploadSection: true
|
||||
showUploadSection: true,
|
||||
className: "mx_Dialog_content" // FIXME - shouldn't be this by default
|
||||
};
|
||||
},
|
||||
|
||||
@ -121,7 +123,7 @@ module.exports = React.createClass({
|
||||
var uploadSection;
|
||||
if (this.props.showUploadSection) {
|
||||
uploadSection = (
|
||||
<div className="mx_Dialog_content">
|
||||
<div className={this.props.className}>
|
||||
Upload new:
|
||||
<input type="file" onChange={this.onFileSelected}/>
|
||||
{this.state.errorText}
|
||||
@ -134,7 +136,7 @@ module.exports = React.createClass({
|
||||
case this.Phases.Error:
|
||||
return (
|
||||
<div>
|
||||
<div className="mx_Dialog_content">
|
||||
<div className={this.props.className}>
|
||||
{avatarImg}
|
||||
</div>
|
||||
{uploadSection}
|
||||
|
Loading…
Reference in New Issue
Block a user