Add Downloaded and Published tabs to My Files page
This commit is contained in:
parent
e1637d537c
commit
4072c1cdda
3 changed files with 12 additions and 4 deletions
12
js/app.js
12
js/app.js
|
@ -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':
|
||||
|
|
|
@ -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' />
|
||||
|
|
|
@ -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` +
|
||||
|
|
Loading…
Reference in a new issue