Sign In issue unresolved
This commit is contained in:
parent
f1830a932b
commit
fbab9a8ddc
51
index.html
51
index.html
@ -222,7 +222,7 @@
|
||||
href="#">this is a link</a>.</p>-->
|
||||
|
||||
<section>
|
||||
<form id="signinform" method="post" action="#">
|
||||
<form id="signinform" method="post" action="">
|
||||
<div class="fields">
|
||||
<div class="field">
|
||||
<label for="priv_key_field">Private Key</label>
|
||||
@ -231,7 +231,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<ul class="actions">
|
||||
<li><input type="submit" value="Sign In" class="primary" /></li>
|
||||
<li><input type="submit" value="Sign In" class="primary" id='privkey_signin_btn' /></li>
|
||||
</ul>
|
||||
</form>
|
||||
</section>
|
||||
@ -261,21 +261,12 @@
|
||||
<p><strong>NEVER</strong> lose your Private Key<br>
|
||||
<strong>NEVER</strong> share your Private Key with anyone<br><br>
|
||||
Losing your Private Key means losing all the accomplishments, data & money attached to your
|
||||
Internship ID. Private Key once lost can NEVER be recovered. Please store it safely.
|
||||
Internship ID. Private Key once lost can <strong>NEVER</strong> be recovered. Please store
|
||||
it safely.
|
||||
</p>
|
||||
<h4></h4>
|
||||
</section>
|
||||
</div>
|
||||
<section>
|
||||
<ul class="icons">
|
||||
<li><a href="https://twitter.com/ranchimallflo" target="_blank"
|
||||
class="icon brands fa-twitter"><span class="label">Twitter</span></a></li>
|
||||
<li><a href="https://facebook.com/ranchimall/" target="_blank"
|
||||
class="icon brands fa-facebook-f"><span class="label">Facebook</span></a></li>
|
||||
<li><a href="https://github.com/ranchimall" target="_blank" class="icon brands fa-github"><span
|
||||
class="label">Github</span></a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
|
||||
@ -9507,7 +9498,16 @@
|
||||
})
|
||||
|
||||
|
||||
let myInput = function () {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
// do either resolve to take in private key, or reject to do guest login
|
||||
document.getElementById('privkey_signin_btn').addEventListener('click', (ev) => {
|
||||
console.log('Test message to check if on click listener is working inside the Promise')
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -9520,31 +9520,6 @@
|
||||
//floDapps.addStartUpFunction('Sample', Promised Function)
|
||||
//floDapps.setAppObjectStores({sampleObs1:{}, sampleObs2:{options{autoIncrement:true, keyPath:'SampleKey'}, Indexes:{sampleIndex:{}}}})
|
||||
//floDapps.setCustomPrivKeyInput( () => { FUNCTION BODY *must return private key* } )
|
||||
let myInput = function () {
|
||||
return new Promise((resolve, reject) => {
|
||||
/*loader('hide')
|
||||
showPopup('sign_in', 'no');*/
|
||||
|
||||
let privField = document.getElementById('priv_key_field');
|
||||
|
||||
/*document.getElementById('guest_btn').onclick = function () {
|
||||
hidePopup('sign_in')
|
||||
reject(null);
|
||||
}*/
|
||||
|
||||
document.getElementById('signinform').addEventListener('submit', (ev) => {
|
||||
ev.preventDefault()
|
||||
if (privField.value.trim().length > 40) {
|
||||
resolve(privField.value.trim())
|
||||
//hidePopup('sign_in')
|
||||
//loader('show')
|
||||
}
|
||||
else {
|
||||
showMessage('error', 'Please enter correct private key.')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
floDapps.setCustomPrivKeyInput(myInput)
|
||||
floDapps.launchStartUp().then(result => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user