Fixed login-logout UI
This commit is contained in:
parent
eb6dac9d2a
commit
34f203b715
@ -300,24 +300,18 @@
|
|||||||
|
|
||||||
// Prevent clicks from inside article from bubbling.
|
// Prevent clicks from inside article from bubbling.
|
||||||
$this.on('click', function(event) {
|
$this.on('click', function(event) {
|
||||||
if (!("jugaad" in event.target.dataset)) {
|
|
||||||
// data attribute doesn't exist
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
|
||||||
else{
|
|
||||||
event.stopPropagation();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Events.
|
// Events.
|
||||||
$body.on('click', function(event) {
|
$body.on('click', function(event) {
|
||||||
|
if(typeof myFloID != 'undefined'){
|
||||||
// Article visible? Hide.
|
// Article visible? Hide.
|
||||||
if ($body.hasClass('is-article-visible'))
|
if ($body.hasClass('is-article-visible'))
|
||||||
$main._hide(true);
|
$main._hide(true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$window.on('keyup', function(event) {
|
$window.on('keyup', function(event) {
|
||||||
|
|||||||
31
index.html
31
index.html
@ -60,6 +60,8 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h1>Internships @ RanchiMall</h1>
|
<h1>Internships @ RanchiMall</h1>
|
||||||
|
<h4 id='welcome_message_top'></h4>
|
||||||
|
<h3 id='welcome_message_bottom'></h3>
|
||||||
<!--<p>A fully responsive site template designed by <a href="https://html5up.net">HTML5 UP</a> and
|
<!--<p>A fully responsive site template designed by <a href="https://html5up.net">HTML5 UP</a> and
|
||||||
released<br />
|
released<br />
|
||||||
for free under the <a href="https://html5up.net/license">Creative Commons</a> license.</p>-->
|
for free under the <a href="https://html5up.net/license">Creative Commons</a> license.</p>-->
|
||||||
@ -238,7 +240,7 @@
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<p>Don't have a Private Key yet? <u id="generatenewflopair"
|
<p>Don't have a Private Key yet? <u id="generatenewflopair"
|
||||||
style="cursor: pointer;"><strong>Lets get you one</strong></u></p>
|
style="cursor: pointer;"><strong>Click Here</strong></u></p>
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@ -267,10 +269,8 @@
|
|||||||
<h4></h4>
|
<h4></h4>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
@ -284,7 +284,8 @@
|
|||||||
<li><a href="https://github.com/ranchimall/" target="_blank" class="icon brands fa-github"><span
|
<li><a href="https://github.com/ranchimall/" target="_blank" class="icon brands fa-github"><span
|
||||||
class="label">GitHub</span></a></li>
|
class="label">GitHub</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="copyright">Design: <a href="https://html5up.net">HTML5 UP</a>.</p>
|
<!--<p class="copyright">Design: <a href="https://html5up.net">HTML5 UP</a>.</p>-->
|
||||||
|
<p class="copyright" style="cursor: pointer;" id='logout_button'>Logout</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -9497,6 +9498,12 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
document.getElementById("logout_button").addEventListener('click', (ev) => {
|
||||||
|
floDapps.clearCredentials().then((result) => {
|
||||||
|
alert(result)
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
let myInput = function () {
|
let myInput = function () {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@ -9509,7 +9516,7 @@
|
|||||||
resolve(priv_key_field.value.trim())
|
resolve(priv_key_field.value.trim())
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('Please enter correct private key.')
|
alert('Please enter correct private key.')
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -9517,6 +9524,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -9524,6 +9532,7 @@
|
|||||||
function onLoadStartUp() {
|
function onLoadStartUp() {
|
||||||
|
|
||||||
window.location.href = `${window.location.origin}#signin`
|
window.location.href = `${window.location.origin}#signin`
|
||||||
|
document.querySelector("#signin .close").style.display = 'none'
|
||||||
|
|
||||||
//floDapps.addStartUpFunction('Sample', Promised Function)
|
//floDapps.addStartUpFunction('Sample', Promised Function)
|
||||||
//floDapps.setAppObjectStores({sampleObs1:{}, sampleObs2:{options{autoIncrement:true, keyPath:'SampleKey'}, Indexes:{sampleIndex:{}}}})
|
//floDapps.setAppObjectStores({sampleObs1:{}, sampleObs2:{options{autoIncrement:true, keyPath:'SampleKey'}, Indexes:{sampleIndex:{}}}})
|
||||||
@ -9531,9 +9540,10 @@
|
|||||||
|
|
||||||
floDapps.setCustomPrivKeyInput(myInput)
|
floDapps.setCustomPrivKeyInput(myInput)
|
||||||
floDapps.launchStartUp().then(result => {
|
floDapps.launchStartUp().then(result => {
|
||||||
console.log(result)
|
document.body.click()
|
||||||
console.log(`Welcome FLO_ID: ${myFloID}`)
|
document.querySelector("#signin .close").style.display = 'initial'
|
||||||
|
document.getElementById('welcome_message_top').innerText = `Welcome`
|
||||||
|
document.getElementById('welcome_message_bottom').innerText = `${myFloID}`
|
||||||
document.getElementById('floid').value = myFloID
|
document.getElementById('floid').value = myFloID
|
||||||
|
|
||||||
//App functions....
|
//App functions....
|
||||||
@ -9557,8 +9567,8 @@
|
|||||||
for (let i = 0; i < projectDetailsKeys.length; i++) {
|
for (let i = 0; i < projectDetailsKeys.length; i++) {
|
||||||
|
|
||||||
newHtml = `<div class="field">
|
newHtml = `<div class="field">
|
||||||
<input type="checkbox" name="vehicle${i}" id="vehicle${i}">
|
<input type="radio" name="${projectDetails[projectDetailsKeys[i]].projectName}" id="project${i}">
|
||||||
<label for="vehicle${i}" data-jugaad="checkbox">${projectDetails[projectDetailsKeys[i]].projectName}</label>
|
<label for="project${i}">${projectDetails[projectDetailsKeys[i]].projectName}</label>
|
||||||
</div>
|
</div>
|
||||||
<p>${projectDetails[projectDetailsKeys[i]].projectDescription}</p>`
|
<p>${projectDetails[projectDetailsKeys[i]].projectDescription}</p>`
|
||||||
projectlistContainer.innerHTML = projectlistContainer.innerHTML + newHtml
|
projectlistContainer.innerHTML = projectlistContainer.innerHTML + newHtml
|
||||||
@ -9619,6 +9629,7 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}).catch(error => console.error(error))
|
}).catch(error => console.error(error))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user