Commit 33ae1cbd authored by mercury233's avatar mercury233

better change avatar

parent ae3ed31d
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"user-info": "User Info", "user-info": "User Info",
"reset-info": "Reset User Info", "reset-info": "Reset User Info",
"Change-Avatar" :"Change Avatar", "Change-Avatar" :"Change Avatar",
"Upload-Avatar" :"Confirm Upload Avatar",
"upload":"upload", "upload":"upload",
"avatar": "Avatar", "avatar": "Avatar",
"nickname": "Nickname", "nickname": "Nickname",
...@@ -103,6 +104,7 @@ ...@@ -103,6 +104,7 @@
"user-info": "用户信息", "user-info": "用户信息",
"reset-info": "修改信息", "reset-info": "修改信息",
"Change-Avatar" :"修改头像", "Change-Avatar" :"修改头像",
"Upload-Avatar":"确认上传头像",
"upload":"上传", "upload":"上传",
"avatar": "头像", "avatar": "头像",
"nickname": "昵称", "nickname": "昵称",
......
...@@ -120,15 +120,16 @@ class Profiles extends React.Component { ...@@ -120,15 +120,16 @@ class Profiles extends React.Component {
/> />
<br/> <br/>
<Button type="primary" onClick={this.handleUpload}> <Button type="primary" onClick={this.handleUpload}>
<Icon type="upload"/> <Format id="upload"/> <Icon type="check"/> <Format id="Upload-Avatar"/>
</Button> </Button>
</div> </div>
<div style={{ display: !isUpload ? 'flex' : 'none', flexDirection: 'column' }}> <div style={{ display: !isUpload ? 'flex' : 'none', flexDirection: 'column' }}>
<img alt="avatar" style={{ height: '20vw', width: '20vw' }} src={avatar || imageUrl || defaultAvatar}/> <img alt="avatar" style={{ height: '20vw', width: '20vw' }} src={avatar || imageUrl || defaultAvatar}/>
<br/>
<Button style={{ padding: '4px 0' }}> <Button style={{ padding: '4px 0' }}>
<label style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center' }}> <label style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Icon type="plus"/><Format id="Change-Avatar"/> <Icon type="plus"/> <Format id="Change-Avatar"/>
<input <input
type="file" onChange={this.onGetFile} ref={(file) => { type="file" onChange={this.onGetFile} ref={(file) => {
this.file = file; this.file = file;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment