mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-01 06:50:00 +00:00
support future api for removing files
This commit is contained in:
parent
d6be0bfa84
commit
ca25d4c570
1 changed files with 10 additions and 0 deletions
|
@ -50,6 +50,14 @@ module.exports = function UserProfile() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// function removeFile(name) {
|
||||||
|
// return function(e) {
|
||||||
|
// e.preventDefault();
|
||||||
|
// dispatch(user.setProfileVal([name, ""]));
|
||||||
|
// dispatch(user.setProfileVal([`${name}File`, ""]));
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="user-profile">
|
<div className="user-profile">
|
||||||
<h1>Profile</h1>
|
<h1>Profile</h1>
|
||||||
|
@ -72,6 +80,7 @@ module.exports = function UserProfile() {
|
||||||
<label htmlFor="header" className="file-input button">Browse</label>
|
<label htmlFor="header" className="file-input button">Browse</label>
|
||||||
<span>{account.headerFile ? account.headerFile.name : "no file selected"}</span>
|
<span>{account.headerFile ? account.headerFile.name : "no file selected"}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{/* <a onClick={removeFile("header")} href="#">remove</a> */}
|
||||||
<input className="hidden" id="header" type="file" accept="image/*" onChange={onFileChange("header")} />
|
<input className="hidden" id="header" type="file" accept="image/*" onChange={onFileChange("header")} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -80,6 +89,7 @@ module.exports = function UserProfile() {
|
||||||
<label htmlFor="avatar" className="file-input button">Browse</label>
|
<label htmlFor="avatar" className="file-input button">Browse</label>
|
||||||
<span>{account.avatarFile ? account.avatarFile.name : "no file selected"}</span>
|
<span>{account.avatarFile ? account.avatarFile.name : "no file selected"}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{/* <a onClick={removeFile("avatar")} href="#">remove</a> */}
|
||||||
<input className="hidden" id="avatar" type="file" accept="image/*" onChange={onFileChange("avatar")} />
|
<input className="hidden" id="avatar" type="file" accept="image/*" onChange={onFileChange("avatar")} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue