re-enable rewards
This commit is contained in:
parent
d6680a7ae5
commit
bb16156034
6 changed files with 35 additions and 34 deletions
|
@ -125,6 +125,10 @@ class ConfirmEmailStage extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
class WelcomeStage extends React.Component {
|
class WelcomeStage extends React.Component {
|
||||||
|
static propTypes = {
|
||||||
|
endAuth: React.PropTypes.func,
|
||||||
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
@ -169,31 +173,20 @@ class WelcomeStage extends React.Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WelcomeStage.propTypes = {
|
|
||||||
endAuth: React.PropTypes.func,
|
|
||||||
};
|
|
||||||
|
|
||||||
class ErrorStage extends React.Component {
|
const ErrorStage = (props) => {
|
||||||
render() {
|
return <section>
|
||||||
return (
|
<p>An error was encountered that we cannot continue from.</p>
|
||||||
<section>
|
<p>At least we're earning the name beta.</p>
|
||||||
<p>An error was encountered that we cannot continue from.</p>
|
{ this.props.errorText ? <p>Message: {props.errorText}</p> : '' }
|
||||||
<p>At least we're earning the name beta.</p>
|
<Link button="alt" label="Try Reload" onClick={() => { window.location.reload() } } />
|
||||||
{ this.props.errorText ? <p>Message: {this.props.errorText}</p> : '' }
|
</section>
|
||||||
<Link button="alt" label="Try Reload" onClick={() => { window.location.reload() } } />
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class PendingStage extends React.Component {
|
const PendingStage = (props) => {
|
||||||
render() {
|
return <section>
|
||||||
return (
|
<p>Preparing for first access <span className="busy-indicator"></span></p>
|
||||||
<section>
|
</section>
|
||||||
<p>Preparing for first access <span className="busy-indicator"></span></p>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -315,9 +308,14 @@ export class AuthOverlay extends React.Component {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const StageContent = this._stages[this.state.stage];
|
const StageContent = this._stages[this.state.stage];
|
||||||
|
|
||||||
|
if (!StageContent) {
|
||||||
|
return <span className="empty">Unknown authentication step.</span>
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
this.state.stage != "welcome" ?
|
this.state.stage != "welcome" ?
|
||||||
<ModalPage className="modal-page--full" isOpen={true} contentLabel="Authentication" {...this.props}>
|
<ModalPage className="modal-page--full" isOpen={true} contentLabel="Authentication">
|
||||||
<h1>LBRY Early Access</h1>
|
<h1>LBRY Early Access</h1>
|
||||||
<StageContent {...this.state.stageProps} setStage={(stage, stageProps) => { this.setStage(stage, stageProps) }} />
|
<StageContent {...this.state.stageProps} setStage={(stage, stageProps) => { this.setStage(stage, stageProps) }} />
|
||||||
</ModalPage> :
|
</ModalPage> :
|
||||||
|
|
|
@ -9,15 +9,11 @@ export class Icon extends React.Component {
|
||||||
fixed: React.PropTypes.bool,
|
fixed: React.PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
static defaultProps = {
|
|
||||||
lines: null
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {fixed, className, ...other} = this.props;
|
const {fixed, className} = this.props;
|
||||||
const spanClassName = ('icon ' + ('fixed' in this.props ? 'icon-fixed-width ' : '') +
|
const spanClassName = ('icon ' + ('fixed' in this.props ? 'icon-fixed-width ' : '') +
|
||||||
this.props.icon + ' ' + (this.props.className || ''));
|
this.props.icon + ' ' + (this.props.className || ''));
|
||||||
return <span className={spanClassName} {... other}></span>
|
return <span className={spanClassName}></span>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +22,10 @@ export class TruncatedText extends React.Component {
|
||||||
lines: React.PropTypes.number,
|
lines: React.PropTypes.number,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static defaultProps = {
|
||||||
|
lines: null
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <span className="truncated-text" style={{ WebkitLineClamp: this.props.lines }}>{this.props.children}</span>;
|
return <span className="truncated-text" style={{ WebkitLineClamp: this.props.lines }}>{this.props.children}</span>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,3 +14,5 @@ export class ModalPage extends React.Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default ModalPage
|
|
@ -47,6 +47,7 @@ export class RewardLink extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
pending: true
|
pending: true
|
||||||
})
|
})
|
||||||
|
|
||||||
rewards.claimReward(this.props.type).then((reward) => {
|
rewards.claimReward(this.props.type).then((reward) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
pending: false,
|
pending: false,
|
||||||
|
|
|
@ -7,7 +7,7 @@ const lbryio = {
|
||||||
_accessToken: getLocal('accessToken'),
|
_accessToken: getLocal('accessToken'),
|
||||||
_authenticationPromise: null,
|
_authenticationPromise: null,
|
||||||
_user : null,
|
_user : null,
|
||||||
enabled: false
|
enabled: true
|
||||||
};
|
};
|
||||||
|
|
||||||
const CONNECTION_STRING = 'https://api.lbry.io/';
|
const CONNECTION_STRING = 'https://api.lbry.io/';
|
||||||
|
|
|
@ -3,10 +3,10 @@ import ReactDOM from 'react-dom';
|
||||||
import lbry from './lbry.js';
|
import lbry from './lbry.js';
|
||||||
import lbryio from './lbryio.js';
|
import lbryio from './lbryio.js';
|
||||||
import lighthouse from './lighthouse.js';
|
import lighthouse from './lighthouse.js';
|
||||||
import App from './component/app/index.js';
|
import App from 'component/app/index.js';
|
||||||
import SplashScreen from './component/splash.js';
|
import SplashScreen from 'component/splash.js';
|
||||||
import SnackBar from './component/snack-bar.js';
|
import SnackBar from 'component/snack-bar.js';
|
||||||
import {AuthOverlay} from './component/auth.js';
|
import {AuthOverlay} from 'component/auth.js';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
import store from 'store.js';
|
import store from 'store.js';
|
||||||
import {
|
import {
|
||||||
|
|
Loading…
Reference in a new issue