Make Publish page send user to My Files as soon as file is listed there

This commit is contained in:
Alex Liebowitz 2016-09-16 11:23:39 -04:00
parent f23d654a6b
commit 09cd853bf2

View file

@ -86,11 +86,11 @@ var PublishPage = React.createClass({
console.log(publishArgs); console.log(publishArgs);
lbry.publish(publishArgs, (message) => { lbry.publish(publishArgs, (message) => {
this.handlePublishSuccess(); this.handlePublishStarted();
this.setState({ this.setState({
submitting: false, submitting: false,
}); });
}, (error) => { }, null, (error) => {
this.handlePublishError(error); this.handlePublishError(error);
this.setState({ this.setState({
submitting: false, submitting: false,
@ -131,7 +131,7 @@ var PublishPage = React.createClass({
submitting: false, submitting: false,
}; };
}, },
handlePublishSuccess: function() { handlePublishStarted: function() {
alert(`Your file ${this.refs.meta_title.getValue()} has been published to LBRY at the address lbry://${this.state.name}!\n\n` + alert(`Your file ${this.refs.meta_title.getValue()} has been published to LBRY at the address lbry://${this.state.name}!\n\n` +
`You will now be taken to your My Files page, where your newly published file will be listed. Your file will take a few minutes to appear for other LBRY users; until then it will be listed as "pending."`); `You will now be taken to your My Files page, where your newly published file will be listed. Your file will take a few minutes to appear for other LBRY users; until then it will be listed as "pending."`);
window.location = "?files"; window.location = "?files";