work on onboarding

This commit is contained in:
Kevin Froman 2019-10-17 05:00:24 -05:00
parent d034072704
commit 265e2c181b
3 changed files with 34 additions and 14 deletions

View File

@ -16,10 +16,6 @@
<script defer src='/shared/navbar.js'></script>
<script defer src='/shared/loadabout.js'></script>
<script defer src='/shared/misc.js'></script>
<script defer src='/shared/main/stats.js'></script>
<script defer src='/shared/panel.js'></script>
<script defer src='/shared/configeditor.js'></script>
<script defer src='/shared/sites.js'></script>
<script defer src='/private/js/console.js'></script>
<script defer src='onboarding.js'></script>
<script>alert("Content security policy appears to not be working. Your browser security is weak!")</script>
@ -68,16 +64,15 @@
<br>
<div class="onboarding">
<noscript><h1>Unforuntately, this requires JavaScript. Don't worry, all scripts are open source and locally loaded.</h1></noscript>
<p>Welcome. There are just a few questions for you to answer before you get started.</p>
<br>
<form method='post'>
<form method='post' id="onboardingForm">
<div class="field">
<div>
I am worried about the following targeting me...
I am concerned about the following targeting me...
</div>
<i class="icon fas fa-laptop-code"></i> <input type="checkbox" name="hackers"> <label for="state"> Cyber criminals</label>
<br>
<i class="icon fas fa-eye"></i> <input type="checkbox" name="state"> <label for="state">Government (mass surveillance)</label>
<i class="icon fas fa-eye"></i> <input type="checkbox" name="state" checked> <label for="state">Government (mass surveillance)</label>
<br>
<i class="icon fas fa-university"></i> <input type="checkbox" name="stateTarget"> <label for="stateTarget">Government (direct target)</label>
<br>
@ -97,16 +92,17 @@
<div>
I want to...
</div>
<i class="icon fas fa-user"></i> <input type="checkbox" name="useDeterministic"> <label for="useDeterminisitc">Use a seed to re(generate) an ID</label>
<i class="icon fas fa-user"></i> <input type="checkbox" name="useDeterministic"> <label for="useDeterministic">Use a seed to re(generate) an ID</label>
<br>
<i class="icon fas fa-envelope"></i> <input type="checkbox" name="useMail"> <label for="useMail">Use OnionrMail</label>
<i class="icon fas fa-envelope"></i> <input type="checkbox" name="useMail" checked> <label for="useMail">Use OnionrMail</label>
<br>
<i class="icon fas fa-comments"></i> <input type="checkbox" name="useCircles"> <label for="useMail">Use Circles (message board system)</label>
<i class="icon fas fa-comments"></i> <input type="checkbox" name="useCircles" checked> <label for="useMail">Use Circles (message board system)</label>
<br>
</div>
<br>
<input type="submit" value="Get Started" class="button is-primary">
<br><br>
</form>
</div>

View File

@ -17,3 +17,9 @@ img{
form{
margin-left: 2%;
}
noscript{
font-size: 2em;
color: yellow;
}

View File

@ -4,5 +4,23 @@ fetch('/getnewkeys', {
}})
.then((resp) => resp.text()) // Transform the data into text
.then(function(resp) {
keys = keys.split('')
keys = resp.split('')
})
function getCheckValue(elName){
return document.getElementsByName(elName)[0].checked
}
document.getElementById('onboardingForm').onsubmit = function(e){
submitInfo = {}
submitInfo.massSurveil = getCheckValue('state')
submitInfo.stateTarget = getCheckValue('stateTarget')
submitInfo.localThreat = getCheckValue('local')
submitInfo.networkContrib = getCheckValue('networkContribution')
submitInfo.plainContrib = getCheckValue('networkContributionPlain')
submitInfo.donate = getCheckValue('donate')
submitInfo.deterministic = getCheckValue('useDeterministic')
submitInfo.mail = getCheckValue('useMail')
e.preventDefault()
}