Add Downloaded and Published tabs to My Files page

This commit is contained in:
Alex Liebowitz 2016-09-23 05:19:39 -04:00
parent e1637d537c
commit 4072c1cdda
3 changed files with 12 additions and 4 deletions

View file

@ -87,6 +87,12 @@ var App = React.createClass({
'?receive' : 'Receive',
'?claim' : 'Claim Beta Code'
};
case 'downloaded':
case 'published':
return {
'?downloaded': 'Downloaded',
'?published': 'Published',
};
default:
return null;
}
@ -103,8 +109,10 @@ var App = React.createClass({
return <WatchPage name={this.state.pageArgs} />;
case 'report':
return <ReportPage />;
case 'files':
return <MyFilesPage />;
case 'downloaded':
return <MyFilesPage show="downloaded" />;
case 'published':
return <MyFilesPage show="published" />;
case 'start':
return <StartPage />;
case 'claim':

View file

@ -32,7 +32,7 @@ var Drawer = React.createClass({
</div>
<DrawerItem href='/?discover' viewingPage={this.props.viewingPage} label="Discover" icon="icon-search" />
<DrawerItem href='/?publish' viewingPage={this.props.viewingPage} label="Publish" icon="icon-upload" />
<DrawerItem href='/?files' viewingPage={this.props.viewingPage} label="My Files" icon='icon-cloud-download' />
<DrawerItem href='/?downloaded' viewingPage={this.props.viewingPage} label="My Files" icon='icon-cloud-download' />
<DrawerItem href="/?wallet" viewingPage={this.props.viewingPage} label="My Wallet" badge={lbry.formatCredits(this.state.balance) } icon="icon-bank" />
<DrawerItem href='/?settings' viewingPage={this.props.viewingPage} label="Settings" icon='icon-gear' />
<DrawerItem href='/?help' viewingPage={this.props.viewingPage} label="Help" icon='icon-question-circle' />

View file

@ -134,7 +134,7 @@ var PublishPage = React.createClass({
handlePublishStarted: function() {
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."`);
window.location = "?files";
window.location = "?published";
},
handlePublishError: function(error) {
alert(`The following error occurred when attempting to publish your file:\n\n` +