more tweaks and turn off auth

This commit is contained in:
Jeremy Kauffman 2017-04-12 12:59:43 -04:00
parent cb4af24cd7
commit a5d1695084
4 changed files with 21 additions and 20 deletions

View file

@ -104,20 +104,20 @@ const ConfirmEmailStage = React.createClass({
});
const WelcomeStage = React.createClass({
onRewardClaim: function() {
console.log('omg');
},
render: function() {
// <p>Thank you
return (
<section>
<h3 className="modal__header">Welcome to LBRY.</h3>
<p>LBRY is the first community controlled content marketplace.</p>
<p>Since you're new here, we'll toss you some credits.</p>
<p>LBRY is kind of like a centaur. Totally normal up top, and <em>way different</em> underneath.</p>
<p>On the upper level, LBRY is like other popular video and media sites.</p>
<p>Below, LBRY is like nothing else. Through blockchain and decentralization, LBRY is controlled by it's users -- that is, you.</p>
<p>Here is a reward for reading our weird centaur metaphor:</p>
<div style={{textAlign: "center", marginBottom: "12px"}}>
<RewardLink type="new_user" onRewardClaim={this.onRewardClaim} />
</div>
<p>LBC is blah blah blah.</p>
<p>And remember, LBRY is a beta and be safe!</p>
<p>This reward earned you <em>LBC</em>. LBC is used to watch stuff and to have say in how the network works.</p>
<p>But no need to understand it all just yet! Try watching something next.</p>
</section>
);
}
@ -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 (

View file

@ -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;
}

View file

@ -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 ? '' :
<div>
<div className="card__content">
<FormRow label="Title" type="text" ref="meta_title" name="title" placeholder="UFOs Are Real" />
<FormRow label="Title" type="text" ref="meta_title" name="title" placeholder="Titular Title" />
</div>
<div className="card__content">
<FormRow type="text" label="Thumbnail URL" ref="meta_thumbnail" name="thumbnail" placeholder="http://mycompany.com/images/ep_1.jpg" />
<FormRow type="text" label="Thumbnail URL" ref="meta_thumbnail" name="thumbnail" placeholder="http://spee.ch/mylogo" />
</div>
<div className="card__content">
<FormRow label="Description" type="textarea" ref="meta_description" name="description" placeholder="Description of your content" />
@ -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} />
<div className="form-row-submit">
<Link button="primary" label={!this.state.creatingChannel ? 'Creating identity' : 'Creating identity...'} onClick={this.handleCreateChannelClick} disabled={this.state.creatingChannel} />
</div>
@ -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} />
</div> : '' }

View file

@ -174,7 +174,7 @@ p
border-radius: 4px;
padding: $spacing-vertical;
box-shadow: $default-box-shadow;
max-width: 250px;
max-width: 400px;
}
.modal__header {