From a5d1695084e269e85042ce6867e2891064bdf447 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 12 Apr 2017 12:59:43 -0400 Subject: [PATCH] more tweaks and turn off auth --- ui/js/component/auth.js | 20 +++++++++++--------- ui/js/component/form.js | 3 ++- ui/js/page/publish.js | 16 +++++++--------- ui/scss/_gui.scss | 2 +- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ui/js/component/auth.js b/ui/js/component/auth.js index bf3fb4232..aa3937e63 100644 --- a/ui/js/component/auth.js +++ b/ui/js/component/auth.js @@ -104,20 +104,20 @@ const ConfirmEmailStage = React.createClass({ }); const WelcomeStage = React.createClass({ - onRewardClaim: function() { - console.log('omg'); - }, render: function() { + //

Thank you return (

Welcome to LBRY.

-

LBRY is the first community controlled content marketplace.

-

Since you're new here, we'll toss you some credits.

+

LBRY is kind of like a centaur. Totally normal up top, and way different underneath.

+

On the upper level, LBRY is like other popular video and media sites.

+

Below, LBRY is like nothing else. Through blockchain and decentralization, LBRY is controlled by it's users -- that is, you.

+

Here is a reward for reading our weird centaur metaphor:

-

LBC is blah blah blah.

-

And remember, LBRY is a beta and be safe!

+

This reward earned you LBC. LBC is used to watch stuff and to have say in how the network works.

+

But no need to understand it all just yet! Try watching something next.

); } @@ -157,7 +157,7 @@ export const AuthOverlay = React.createClass({ getInitialState: function() { return { - stage: "pending", + stage: null, stageProps: {} }; }, @@ -200,7 +200,9 @@ export const AuthOverlay = React.createClass({ }, render: function() { if (!this.state.stage || lbryio.user && lbryio.user.HasVerifiedEmail) { - return null; + if (this.state.stage != "welcome") { + return null; + } } const StageContent = this._stages[this.state.stage]; return ( diff --git a/ui/js/component/form.js b/ui/js/component/form.js index c24bd7b92..ef8a7169b 100644 --- a/ui/js/component/form.js +++ b/ui/js/component/form.js @@ -50,7 +50,8 @@ export let FormField = React.createClass({ if (this.props.type == 'checkbox') { return this.refs.field.checked; } else if (this.props.type == 'file') { - return !!(this.refs.field.files.length && this.refs.field.files[0].path); + return this.refs.field.files.length && this.refs.field.files[0].path ? + this.refs.field.files[0].path : null; } else { return this.refs.field.value; } diff --git a/ui/js/page/publish.js b/ui/js/page/publish.js index 7ec3ebd0c..f00a30370 100644 --- a/ui/js/page/publish.js +++ b/ui/js/page/publish.js @@ -86,12 +86,10 @@ var PublishPage = React.createClass({ }; if (this.refs.file.getValue() !== '') { - publishArgs.file_path = this.refs.file.getValue(); + publishArgs.file_path = this.refs.file.getValue(); } - console.log(publishArgs); lbry.publish(publishArgs, (message) => { - console.log(message); this.handlePublishStarted(); }, null, (error) => { this.handlePublishError(error); @@ -117,13 +115,13 @@ var PublishPage = React.createClass({ channels: null, rawName: '', name: '', - bid: 0.01, + bid: 1, hasFile: false, feeAmount: '', feeCurrency: 'USD', channel: 'anonymous', newChannelName: '@', - newChannelBid: '', + newChannelBid: 10, nameResolved: false, topClaimValue: 0.0, myClaimValue: 0.0, @@ -392,10 +390,10 @@ var PublishPage = React.createClass({ { !this.state.hasFile ? '' :
- +
- +
@@ -495,7 +493,7 @@ var PublishPage = React.createClass({ type="number" helper={lbcInputHelp} onChange={this.handleNewChannelBidChange} - value={this.state.newChannelBid ? this.state.newChannelBid : '10'} /> + value={this.state.newChannelBid} />
@@ -521,7 +519,7 @@ var PublishPage = React.createClass({ label="Deposit" postfix="LBC" onChange={this.handleBidChange} - value={this.state.bid ? this.state.bid : '1'} + value={this.state.bid} placeholder={this.state.nameResolved ? this.state.topClaimValue + 10 : 100} helper={lbcInputHelp} />
: '' } diff --git a/ui/scss/_gui.scss b/ui/scss/_gui.scss index f1cf53c40..15246c7f6 100644 --- a/ui/scss/_gui.scss +++ b/ui/scss/_gui.scss @@ -174,7 +174,7 @@ p border-radius: 4px; padding: $spacing-vertical; box-shadow: $default-box-shadow; - max-width: 250px; + max-width: 400px; } .modal__header {