From fbab9a8ddc47fa84fa897535b53f3b51d127fa68 Mon Sep 17 00:00:00 2001
From: Vivek Teega
Date: Tue, 7 Jul 2020 18:46:12 +0530
Subject: [PATCH] Sign In issue unresolved
---
index.html | 51 +++++++++++++--------------------------------------
1 file changed, 13 insertions(+), 38 deletions(-)
diff --git a/index.html b/index.html
index 168f4fc..a9331e2 100644
--- a/index.html
+++ b/index.html
@@ -222,7 +222,7 @@
href="#">this is a link.
-->
@@ -261,21 +261,12 @@
NEVER lose your Private Key
NEVER share your Private Key with anyone
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 NEVER be recovered. Please store
+ it safely.
-
@@ -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')
+ })
+
+ })
+ }
@@ -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 => {