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,
|
description : publish.metadata.description,
|
||||||
license : publish.metadata.license,
|
license : publish.metadata.license,
|
||||||
nsfw : publish.metadata.nsfw,
|
nsfw : publish.metadata.nsfw,
|
||||||
|
isUpdate : publish.isUpdate,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,27 +26,30 @@ class PublishMetadataInputs extends React.Component {
|
||||||
this.props.onMetadataChange(name, selectedOption);
|
this.props.onMetadataChange(name, selectedOption);
|
||||||
}
|
}
|
||||||
render () {
|
render () {
|
||||||
|
const { showMetadataInputs, description, isUpdate, nsfw } = this.props;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{this.props.showMetadataInputs && (
|
{(showMetadataInputs || isUpdate) && (
|
||||||
<div>
|
<div>
|
||||||
<PublishDescriptionInput
|
<PublishDescriptionInput
|
||||||
description={this.props.description}
|
description={description}
|
||||||
handleInput={this.handleInput}
|
handleInput={this.handleInput}
|
||||||
/>
|
/>
|
||||||
<PublishLicenseInput
|
<PublishLicenseInput
|
||||||
handleSelect={this.handleSelect}
|
handleSelect={this.handleSelect}
|
||||||
/>
|
/>
|
||||||
<PublishNsfwInput
|
<PublishNsfwInput
|
||||||
nsfw={this.props.nsfw}
|
nsfw={nsfw}
|
||||||
handleInput={this.handleInput}
|
handleInput={this.handleInput}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<ButtonSecondary
|
{!isUpdate && (
|
||||||
value={this.props.showMetadataInputs ? 'less' : 'more'}
|
<ButtonSecondary
|
||||||
onClickHandler={this.toggleShowInputs}
|
value={showMetadataInputs ? 'less' : 'more'}
|
||||||
/>
|
onClickHandler={this.toggleShowInputs}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue