Merge pull request #371 from teaxyz/auth-number-fix

No LocalSorage Logic for Auth Number
This commit is contained in:
Thomas Smith 2023-06-02 13:35:13 +02:00 committed by GitHub
commit 4f90c67e4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 84 deletions

View file

@ -1,5 +1,5 @@
<script>
<script>
// Add a 400px tall placeholder
$('#count').html('<div style="height: 400px"></div>');
$('#count1').html('<div style="height: 400px"></div>');
@ -17,22 +17,20 @@
fetch('https://app.tea.xyz/api/signups')
.then(res => res.json())
.then(res => {
const signups = res.signups ? res.signups.toLocaleString() : ""
if (!(localStorage['signup'] || '').match(/:::/)) {
$('#count').html(signups)
}
$('#count1').html(signups)
$('#count2').html(signups)
$('#count3').html(signups)
$('#count4').html(signups)
$('#count5').html(signups)
$('#count6').html(signups)
$('#count7').html(signups)
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "")
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
})
const signups = res.signups ? res.signups.toLocaleString() : "";
$('#count').html(signups);
$('#count1').html(signups);
$('#count2').html(signups);
$('#count3').html(signups);
$('#count4').html(signups);
$('#count5').html(signups);
$('#count6').html(signups);
$('#count7').html(signups);
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "");
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "");
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "");
});
} catch (e) {
console.error(e)
console.error(e);
}
</script>
</script>

View file

@ -95,30 +95,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
$(window).scroll(function () {
$('nav').toggleClass('scrolled', $(this).scrollTop() > 100);
});
if (localStorage['signup'].match(/:::/)) {
const [username, serial_] = localStorage.signup.split(':::');
const serial = (+serial_).toLocaleString()
$('.box-auth-true').show();
$('.box-auth-false').hide();
$('#auth-username').html(username);
$('#count').html(`${serial} / <span id='count3'></span>`);
$('#count-sub-text').html('YOUR AUTHENTICATION NUMBER');
$('#communitea').html('Thanks for joining our communi&#39;<span style="color:#54BAAB;">tea</span>');
$('#revolution-text').html(
'Now stay tuned! As an early authenticator, youll be entitled to a variety of exciting rewards, including minted NFT certificates.'
);
$('#auth-body-text').hide();
$('.rounded-pill').hide();
$('.auth-btn').html('Configure GitHub App');
$('.auth-btn').attr('href', 'https://github.com/apps/tea-xyz')
}
</script>
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};

View file

@ -18,30 +18,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
$(window).scroll(function () {
$('nav').toggleClass('scrolled', $(this).scrollTop() > 100);
});
if (localStorage['signup'].match(/:::/)) {
const [username, serial_] = localStorage.signup.split(':::');
const serial = (+serial_).toLocaleString()
$('.box-auth-true').show();
$('.box-auth-false').hide();
$('#auth-username').html(username);
$('#count').html(`${serial} / <span id='count3'></span>`);
$('#count-sub-text').html('YOUR AUTHENTICATION NUMBER');
$('#communitea').html('Thanks for joining our communi&#39;<span style="color:#54BAAB;">tea</span>');
$('#revolution-text').html(
'Now stay tuned! As an early authenticator, youll be entitled to a variety of exciting rewards, including minted NFT certificates.'
);
$('#auth-body-text').hide();
$('.rounded-pill').hide();
$('.auth-btn').html('Configure GitHub App');
$('.auth-btn').attr('href', 'https://github.com/apps/tea-xyz')
}
</script>
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};