always show metadata inputs on update
This commit is contained in:
parent
5747245e64
commit
41cc6f5118
2 changed files with 11 additions and 7 deletions
|
@ -8,6 +8,7 @@ const mapStateToProps = ({ publish }) => {
|
|||
description : publish.metadata.description,
|
||||
license : publish.metadata.license,
|
||||
nsfw : publish.metadata.nsfw,
|
||||
isUpdate : publish.isUpdate,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -26,27 +26,30 @@ class PublishMetadataInputs extends React.Component {
|
|||
this.props.onMetadataChange(name, selectedOption);
|
||||
}
|
||||
render () {
|
||||
const { showMetadataInputs, description, isUpdate, nsfw } = this.props;
|
||||
return (
|
||||
<div>
|
||||
{this.props.showMetadataInputs && (
|
||||
{(showMetadataInputs || isUpdate) && (
|
||||
<div>
|
||||
<PublishDescriptionInput
|
||||
description={this.props.description}
|
||||
description={description}
|
||||
handleInput={this.handleInput}
|
||||
/>
|
||||
<PublishLicenseInput
|
||||
handleSelect={this.handleSelect}
|
||||
/>
|
||||
<PublishNsfwInput
|
||||
nsfw={this.props.nsfw}
|
||||
nsfw={nsfw}
|
||||
handleInput={this.handleInput}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<ButtonSecondary
|
||||
value={this.props.showMetadataInputs ? 'less' : 'more'}
|
||||
onClickHandler={this.toggleShowInputs}
|
||||
/>
|
||||
{!isUpdate && (
|
||||
<ButtonSecondary
|
||||
value={showMetadataInputs ? 'less' : 'more'}
|
||||
onClickHandler={this.toggleShowInputs}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue