From 5f2174dd076090d5184a528d4bf3851bddbab6c0 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Mon, 4 Jul 2016 11:29:58 -0400 Subject: [PATCH] Add claim code page --- dist.zip | Bin 2465539 -> 2467399 bytes dist/index.html | 1 + js/app.js | 4 +- js/lbry.js | 8 ++++ js/main.js | 14 ++++++- js/page/claim_code.js | 89 ++++++++++++++++++++++++++++++++++++++++++ js/page/settings.js | 5 +++ js/page/watch.js | 2 +- 8 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 js/page/claim_code.js diff --git a/dist.zip b/dist.zip index 0ea7006152d6ce8e97ba566ac44991d0bc5cda69..a1f00be82a93a2bbf33e14d5ba7b2ace7c1da6f0 100644 GIT binary patch delta 13909 zcmZWw2RxSF7q|Cb@xC^Xz4yp0B4m^mlI*=_cuPhZ*`5dyvWv?V)~ZZ*z_kh9hQL(E*>2g z5%e2;=6$jXJK+RG?6wN2cGyJVLiHz>NJ3&<2mv0p5paQQG}tU8_MU#mW@K1sY87|t z8k#LelLos^lLp7z3vM+=;M6rn;4(78t=Cz&b+5DVa!;UJbpem@=x5;m+e!F!x049m z1#rpb-h&5?1Wd4Ly=o!hz)6Uc2AWZUGCWHpBQ*twd-%vz$`KP_qif)*4KcD# zMV`0}2PS-0B;Ety8bs*BgKKpT#QGQmhy#gfU|1b%5OEpCy#8q7SaO)pEREO?(>HXV zxQr9-3+*BdY+F;qyPLJAc!sE|X20xFbHp@IrERA`_=3l%!3&_jg* zDkthZh8b=Aai^h`HLAgMZV;|<(IS+2;F_I0;!q1W!}2}o5P@JrLE|%xi@+?EN)sK= zX)&_a4O7M`4sh!1sFVe%Vu!-zwre@D>s9C5U+7loK9gW>0Uzn!@tXK8nX6YtX_Icus){furQ`iOL8 zYE9qy{TO_w(z4G4bRKz)Srjpj%N_IVJ|&N@Q>Lq1vq!7Z3B*mZ&&iC{w|@o#g-W;O z_|k_{rMcbopI@Y@<+4fcw#3OKiZRPI=hcx|c;x-)q$dii#N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a8_*h);#U@0L0LfjM^;*))VB9sLe&r2+zQEsW3sA;fE6?th5= zU_7|pKX_b?Scedyx4!N+rDiNI5HsV z!Hc|Lvnq}s)V&3L_#jU1uk;#0it*}TjL$j@t?Fp_5n zB!U#6$H8q;?d)m9U$kr{gupT22yJnI?=u0aogpXuOpqJmL?k$xxqJ0)5pcgGAekBt z2P)p)y$W4!L%4bs7$>oN%wOGxK=rCHh=0dDZV;Z_!-X(H1VwmZuxqbM%7Re*54W4r zE5f06LHA4US;p&?L>u5PHT^r#aQ>;OU!rU52ov600EHT>z#tcl`p8`~Y#~B;4Izv@qiNU8pt6 z!vIKg1o+>r;m5IU(3u<}uL(Nk03t`eNCSj;!Oh9d$#!R!O(^u2_C&x0mQz0zU{}di zhxI+J9qi!mKjG^^U_Jl)t=!katpGxwaV#|gLBD6PhtxsOT;Kp4@BTLcATXktxd1!9 zUVEn*M-Ml7Ldgx>P+VlIb`A1q?h`1cGT#Yl|j3hTHKmdjKo)f)xNNIRFQ?Kg#-#H23HdPXA%|0CuiLo1Hc;+If0xQvt*l zAbu9Cz6XUW9QM1lb{GSqT9`fSe~qi}CLQ+n>bS#>tvw_!(HMc`-8~_Yr|K9%SIv18 z2?DVSC5Am?RN@Na?*lB7gplmNP>8=!|95Po_%D*o9RNvu0VWi&U5MWRXYK<6Qc7L` t;-a0GuhT_1*6|kh34q?W6Jw3ZpIVS}WKe8~Ktw`+r-cxRY)Bu0_&@5IB9{OF diff --git a/dist/index.html b/dist/index.html index 0378506e9..1d42421a7 100644 --- a/dist/index.html +++ b/dist/index.html @@ -34,6 +34,7 @@ + diff --git a/js/app.js b/js/app.js index 69a2f41f7..ef6dc5cbe 100644 --- a/js/app.js +++ b/js/app.js @@ -4,7 +4,7 @@ var App = React.createClass({ var match, param, val; [match, param, val] = window.location.search.match(/\??([^=]*)(?:=(.*))?/); - if (['settings', 'help', 'start', 'watch', 'report', 'files'].indexOf(param) != -1) { + if (['settings', 'help', 'start', 'watch', 'report', 'files', 'claim'].indexOf(param) != -1) { var viewingPage = param; } else { var viewingPage = 'home'; @@ -56,6 +56,8 @@ var App = React.createClass({ return ; } else if (this.state.viewingPage == 'start') { return ; + } else if (this.state.viewingPage == 'claim') { + return ; } } }); \ No newline at end of file diff --git a/js/lbry.js b/js/lbry.js index 25bcb4927..29f0e04f7 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -77,6 +77,14 @@ lbry.getStartNotice = function(callback) { lbry.call('get_start_notice', {}, callback); } +lbry.checkFirstRun = function(callback) { + lbry.call('is_first_run', {}, callback); +} + +lbry.getNewAddress = function(callback) { + lbry.call('get_new_address', {}, callback); +} + lbry.getSettings = function(callback) { lbry.call('get_settings', {}, callback); }; diff --git a/js/main.js b/js/main.js index 6305ccfa3..ed8398146 100644 --- a/js/main.js +++ b/js/main.js @@ -4,7 +4,19 @@ var init = function() { ReactDOM.render( , canvas); + // On home page, if the balance is 0, display claim code page instead of home page. + // Find somewhere better for this logic + if (window.location.search == '' || window.location.search == '?' || window.location.search == 'home') { + lbry.getBalance((balance) => { + if (balance <= 0) { + window.location.href = '?claim'; + } else { + ReactDOM.render(, canvas); + } + }); + } else { + ReactDOM.render(, canvas); + } }}/>, canvas ); diff --git a/js/page/claim_code.js b/js/page/claim_code.js new file mode 100644 index 000000000..4a53d9893 --- /dev/null +++ b/js/page/claim_code.js @@ -0,0 +1,89 @@ +var claimCodePageStyle = { + textAlign: 'center', +}, claimCodeContentStyle = { + display: 'inline-block', + textAlign: 'left', + width: '600px', +}, claimCodeLabelStyle = { + display: 'inline-block', + cursor: 'default', + width: '130px', +}; + +var ClaimCodePage = React.createClass({ + getInitialState: function() { + return { + submitting: false, + } + }, + handleSubmit: function() { + if (!this.refs.code.value) { + alert('Please enter an invitation code or choose "Skip."') + } + + this.setState({ + submitting: true + }); + + lbry.getNewAddress((address) => { + var code = this.refs.code.value; + var email = this.refs.email.value; + + var xhr = new XMLHttpRequest; + xhr.addEventListener('load', () => { + var response = JSON.parse(xhr.responseText); + + if (response.success) { + alert('Your invite code has been redeemed! 200 LBRY credits will be added to your balance shortly.'); + // Send them to "landing" instead of "home" (home will just trigger the message all over again until the credits arrive) + window.location = '?landing'; + } else { + alert("You've entered an invalid code, or one that's already been claimed. Please check your code and try again."); + this.setState({ + submitting: false + }); + } + }); + + xhr.addEventListener('error', () => { + this.setState({ + submitting: false + }); + alert('LBRY couldn\'t connect to our servers to confirm your invitation code. Please check your ' + + 'internet connection. If you continue to have problems, you can still browse LBRY and ' + + 'visit the Settings page to redeem your code later.'); + }); + + xhr.open('POST', 'https://invites.lbry.io', true); + xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xhr.send('code=' + code + '&address=' + address + (email ? ('&email=' + email) : '')); + }); + }, + handleSkip: function() { + alert('Welcome to LBRY! You can visit the Settings page to redeem an invite code at any time.'); + window.location = '?landing'; + }, + render: function() { + return ( +
+

Claim your beta invitation code

+
+

Thanks for beta testing LBRY! Enter your invitation code below to receive your 200 free LBRY credits.

+

You may also enter your email address. This will add you to our mailing list (if you're not already on it) + as well as making you eligible for future rewards for beta testers.

+
+
+
+
+
+
+
+
+ + +
+
+ ); + } +}); \ No newline at end of file diff --git a/js/page/settings.js b/js/page/settings.js index 31b7c1d27..02bcd7824 100644 --- a/js/page/settings.js +++ b/js/page/settings.js @@ -113,6 +113,11 @@ var SettingsPage = React.createClass({ Help make LBRY better by contributing diagnostic data about my usage +
+

Claim invite code

+ +
+
diff --git a/js/page/watch.js b/js/page/watch.js index de35959d4..e47b434b2 100644 --- a/js/page/watch.js +++ b/js/page/watch.js @@ -44,7 +44,7 @@ var WatchPage = React.createClass({ {this.state.loadStatusMessage}... );