2017-12-28 20:51:03 +01:00
|
|
|
import React from 'react';
|
2018-02-03 01:06:21 +01:00
|
|
|
import { withRouter } from 'react-router-dom';
|
2018-01-18 00:00:03 +01:00
|
|
|
import Dropzone from 'containers/Dropzone';
|
|
|
|
import PublishTitleInput from 'containers/PublishTitleInput';
|
|
|
|
import PublishUrlInput from 'containers/PublishUrlInput';
|
|
|
|
import PublishThumbnailInput from 'containers/PublishThumbnailInput';
|
|
|
|
import PublishMetadataInputs from 'containers/PublishMetadataInputs';
|
|
|
|
import ChannelSelect from 'containers/ChannelSelect';
|
2018-01-12 00:37:32 +01:00
|
|
|
|
2018-03-02 02:16:04 +01:00
|
|
|
class PublishDetails extends React.Component {
|
2018-03-01 23:00:29 +01:00
|
|
|
constructor (props) {
|
|
|
|
super(props)
|
|
|
|
this.onPublishSubmit = this.onPublishSubmit.bind(this);
|
|
|
|
}
|
|
|
|
onPublishSubmit () {
|
|
|
|
this.props.startPublish(this.props.history);
|
|
|
|
}
|
2017-12-28 20:51:03 +01:00
|
|
|
render () {
|
|
|
|
return (
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='row row--no-bottom'>
|
|
|
|
<div className='column column--10'>
|
2018-01-09 02:46:17 +01:00
|
|
|
<PublishTitleInput />
|
2018-01-03 02:12:57 +01:00
|
|
|
</div>
|
2018-02-06 03:14:12 +01:00
|
|
|
{/* left column */}
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='column column--5 column--sml-10' >
|
|
|
|
<div className='row row--padded'>
|
2018-01-17 18:24:17 +01:00
|
|
|
<Dropzone />
|
2017-12-28 20:51:03 +01:00
|
|
|
</div>
|
2018-01-03 02:12:57 +01:00
|
|
|
</div>
|
2018-02-06 03:14:12 +01:00
|
|
|
{/* right column */}
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='column column--5 column--sml-10 align-content-top'>
|
|
|
|
<div id='publish-active-area' className='row row--padded'>
|
|
|
|
<div className='row row--padded row--no-top row--wide'>
|
2018-01-10 20:26:01 +01:00
|
|
|
<PublishUrlInput />
|
|
|
|
</div>
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='row row--padded row--no-top row--wide'>
|
2018-01-17 18:46:16 +01:00
|
|
|
<ChannelSelect />
|
2018-01-10 20:26:01 +01:00
|
|
|
</div>
|
2018-01-11 21:51:38 +01:00
|
|
|
{ (this.props.file.type === 'video/mp4') && (
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='row row--padded row--no-top row--wide '>
|
2018-01-11 21:51:38 +01:00
|
|
|
<PublishThumbnailInput />
|
|
|
|
</div>
|
|
|
|
)}
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='row row--padded row--no-top row--no-bottom row--wide'>
|
2018-01-10 22:10:08 +01:00
|
|
|
<PublishMetadataInputs />
|
|
|
|
</div>
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='row row--wide align-content-center'>
|
2018-03-01 23:00:29 +01:00
|
|
|
<button id='publish-submit' className='button--primary button--large' onClick={this.onPublishSubmit}>Publish</button>
|
2017-12-28 20:51:03 +01:00
|
|
|
</div>
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='row row--padded row--no-bottom align-content-center'>
|
2018-03-01 23:00:29 +01:00
|
|
|
<button className='button--cancel' onClick={this.props.clearFile}>Cancel</button>
|
2018-01-03 02:12:57 +01:00
|
|
|
</div>
|
2018-02-26 02:38:14 +01:00
|
|
|
<div className='row row--short align-content-center'>
|
|
|
|
<p className='fine-print'>By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. <a className='link--primary' target='_blank' href='https://lbry.io/learn'>Read more.</a></p>
|
2017-12-28 20:51:03 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-03-02 02:16:04 +01:00
|
|
|
export default withRouter(PublishDetails);
|