mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +00:00
improve modification logic
This commit is contained in:
parent
2e627a2b71
commit
1ae44d6c86
@ -138,13 +138,15 @@ export default (props) => {
|
|||||||
<antd.Divider />
|
<antd.Divider />
|
||||||
|
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<antd.Button
|
{
|
||||||
onClick={props.onDeletePlaylist}
|
props.playlist._id && <antd.Button
|
||||||
icon={<Icons.MdDelete />}
|
onClick={props.onDeletePlaylist}
|
||||||
danger
|
icon={<Icons.MdDelete />}
|
||||||
>
|
danger
|
||||||
Delete Playlist
|
>
|
||||||
</antd.Button>
|
Delete Playlist
|
||||||
|
</antd.Button>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -121,6 +121,10 @@ export default class PlaylistCreatorSteps extends React.Component {
|
|||||||
if (result) {
|
if (result) {
|
||||||
app.message.success("Playlist published")
|
app.message.success("Playlist published")
|
||||||
|
|
||||||
|
if (typeof this.props.onModification === "function") {
|
||||||
|
this.props.onModification()
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof this.props.close === "function") {
|
if (typeof this.props.close === "function") {
|
||||||
this.props.close()
|
this.props.close()
|
||||||
}
|
}
|
||||||
@ -250,6 +254,10 @@ export default class PlaylistCreatorSteps extends React.Component {
|
|||||||
if (result) {
|
if (result) {
|
||||||
app.message.success("Playlist deleted")
|
app.message.success("Playlist deleted")
|
||||||
|
|
||||||
|
if (typeof this.props.onModification === "function") {
|
||||||
|
this.props.onModification()
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof this.props.close === "function") {
|
if (typeof this.props.close === "function") {
|
||||||
this.props.close()
|
this.props.close()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user