fixed onboarding bugs and enabled it by default
This commit is contained in:
parent
6500229000
commit
246ba6eb7b
@ -38,22 +38,26 @@ def set_config_from_onboarding(config_settings: OnboardingConfig):
|
|||||||
|
|
||||||
get = _get_val_or_none
|
get = _get_val_or_none
|
||||||
|
|
||||||
|
config.reload()
|
||||||
|
|
||||||
if get(config_settings, 'stateTarget') or not get(config_settings,
|
if get(config_settings, 'stateTarget') or not get(config_settings,
|
||||||
'networkContribution'):
|
'networkContrib'):
|
||||||
config.set('general.security_level', 1)
|
config.set('general.security_level', 1)
|
||||||
|
|
||||||
config.set('ui.theme', 'light')
|
config.set('ui.theme', 'light')
|
||||||
if get(config_settings, 'useDark'):
|
if get(config_settings, 'useDark'):
|
||||||
config.set('ui.theme', 'dark')
|
config.set('ui.theme', 'dark')
|
||||||
|
|
||||||
if not get(config_settings,
|
disabled = config.get('plugins.disabled', [])
|
||||||
'useCircles') or config.get('general.security_level') > 0:
|
|
||||||
config.set('plugins.disabled',
|
|
||||||
config.get('plugins.disabled', []).append('flow'))
|
|
||||||
|
|
||||||
if not get(config_settings, 'useMail'):
|
if not get(config_settings, 'circles') or \
|
||||||
config.set('plugins.disabled',
|
config.get('general.security_level') > 0:
|
||||||
config.get('plugins.disabled', []).append('pms'))
|
disabled.append('flow')
|
||||||
|
|
||||||
|
if not get(config_settings, 'mail'):
|
||||||
|
disabled.append('pms')
|
||||||
|
|
||||||
|
config.set('plugins.disabled', disabled)
|
||||||
|
|
||||||
config.set('general.store_plaintext_blocks',
|
config.set('general.store_plaintext_blocks',
|
||||||
get(config_settings, 'plainContrib'))
|
get(config_settings, 'plainContrib'))
|
||||||
|
@ -53,7 +53,7 @@ MAX_NEW_PEER_QUEUE = 1000
|
|||||||
"""Make announce take a few seconds (on average) to compute to discourage excessive node announcements"""
|
"""Make announce take a few seconds (on average) to compute to discourage excessive node announcements"""
|
||||||
ANNOUNCE_POW = 6
|
ANNOUNCE_POW = 6
|
||||||
"""30 days is plenty of time for someone to decide to renew a block"""
|
"""30 days is plenty of time for someone to decide to renew a block"""
|
||||||
DEFAULT_EXPIRE = 300
|
DEFAULT_EXPIRE = 2592000
|
||||||
# Metadata header section length limits, in bytes
|
# Metadata header section length limits, in bytes
|
||||||
BLOCK_METADATA_LENGTHS = {'meta': 1000, 'sig': 200, 'signer': 200, 'time': 10, 'pow': 1000, 'encryptType': 4, 'expire': 14}
|
BLOCK_METADATA_LENGTHS = {'meta': 1000, 'sig': 200, 'signer': 200, 'time': 10, 'pow': 1000, 'encryptType': 4, 'expire': 14}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
"verbosity": "default"
|
"verbosity": "default"
|
||||||
},
|
},
|
||||||
"onboarding": {
|
"onboarding": {
|
||||||
"done": true
|
"done": false
|
||||||
},
|
},
|
||||||
"peers": {
|
"peers": {
|
||||||
"max_connect": 1000,
|
"max_connect": 1000,
|
||||||
@ -43,8 +43,8 @@
|
|||||||
"minimum_score": -100
|
"minimum_score": -100
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"disabled": {},
|
"disabled": [],
|
||||||
"enabled": {}
|
"enabled": []
|
||||||
},
|
},
|
||||||
"timers": {
|
"timers": {
|
||||||
"getBlocks": 10,
|
"getBlocks": 10,
|
||||||
|
@ -61,7 +61,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -78,49 +77,54 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="onboarding">
|
<div class="columns">
|
||||||
<noscript><h1>Unfortunately, this requires JavaScript. Don't worry, all scripts are open source and locally loaded.</h1></noscript>
|
<div class="column">
|
||||||
<p>Welcome. There are just a few questions for you to answer before you get started.</p>
|
<div class="onboarding">
|
||||||
<br>
|
<noscript><h1>Unfortunately, this requires JavaScript. Don't worry, all scripts are open source and locally loaded.</h1></noscript>
|
||||||
<form method='post' id="onboardingForm">
|
<p>Welcome. There are just a few questions for you to answer before you get started.</p>
|
||||||
<div class="field">
|
|
||||||
<div>
|
|
||||||
I am concerned about the following targeting me...
|
|
||||||
</div>
|
|
||||||
<i class="icon fas fa-eye"></i> <input type="checkbox" name="state" checked> <label for="state">Government (mass surveillance)</label>
|
|
||||||
<br>
|
<br>
|
||||||
<i class="icon fas fa-university"></i> <input type="checkbox" name="stateTarget"> <label for="stateTarget">Government (direct target)</label>
|
<form method='post' id="onboardingForm">
|
||||||
<br>
|
<div class="field">
|
||||||
<i class="icon fas fa-binoculars"></i> <input type="checkbox" name="local"> <label for="local">Nearby threat</label>
|
<div>
|
||||||
</div>
|
I am concerned about the following targeting me...
|
||||||
<div class="field">
|
</div>
|
||||||
<div>
|
<i class="icon fas fa-eye"></i> <input type="checkbox" name="state" checked> <label for="state">Government (mass surveillance)</label>
|
||||||
I want to contribute to Onionr by...
|
<br>
|
||||||
</div>
|
<i class="icon fas fa-university"></i> <input type="checkbox" name="stateTarget"> <label for="stateTarget">Government (direct target)</label>
|
||||||
<i class="icon fas fa-network-wired"></i> <input checked type="checkbox" name="networkContribution"> <label for="networkContribution">Participating in data storage & sharing</label>
|
<br>
|
||||||
<br>
|
<i class="icon fas fa-binoculars"></i> <input type="checkbox" name="local"> <label for="local">Nearby threat</label>
|
||||||
<i class="icon fas fa-book-open"></i> <input checked type="checkbox" name="networkContributionPlain"> <label for="networkContributionPlain">Storing plaintext data</label>
|
</div>
|
||||||
<br>
|
<div class="field">
|
||||||
<i class="icon fas fa-dollar-sign"></i> <input type="checkbox" name="donate"> <label for="donate">Donating the price of a coffee to fund development</label>
|
<div>
|
||||||
</div>
|
I want to contribute to Onionr by...
|
||||||
<div class="field">
|
</div>
|
||||||
<div>
|
<i class="icon fas fa-network-wired"></i> <input checked type="checkbox" name="networkContribution"> <label for="networkContribution">Participating in data storage & sharing</label>
|
||||||
I want to...
|
<br>
|
||||||
</div>
|
<i class="icon fas fa-book-open"></i> <input checked type="checkbox" name="networkContributionPlain"> <label for="networkContributionPlain">Storing plaintext data</label>
|
||||||
<i class="icon fas fa-user"></i> <input type="checkbox" name="useDeterministic"> <label for="useDeterministic">Use a seed to re(generate) a user ID</label>
|
<br>
|
||||||
<br>
|
<i class="icon fas fa-dollar-sign"></i> <input type="checkbox" name="donate"> <label for="donate">Donating the price of a coffee to fund development</label>
|
||||||
<i class="icon fas fa-envelope"></i> <input type="checkbox" name="useMail" checked> <label for="useMail">Use OnionrMail</label>
|
</div>
|
||||||
<br>
|
<div class="field">
|
||||||
<i class="icon fas fa-comments"></i> <input type="checkbox" name="useCircles" checked> <label for="useMail">Use Circles (message board system)</label>
|
<div>
|
||||||
<br>
|
I want to...
|
||||||
<i class="icon fas fa-palette"></i> <input type="checkbox" name="useDarkTheme" checked> <label for="useDark">Use Dark Theme</label>
|
</div>
|
||||||
|
<!--<i class="icon fas fa-user"></i> <input type="checkbox" name="useDeterministic"> <label for="useDeterministic">Use a seed to re(generate) a user ID</label>
|
||||||
|
<br>
|
||||||
|
-->
|
||||||
|
<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" checked> <label for="useMail">Use Circles (message board system)</label>
|
||||||
|
<br>
|
||||||
|
<i class="icon fas fa-palette"></i> <input type="checkbox" name="useDarkTheme" checked> <label for="useDark">Use Dark Theme</label>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<input type="submit" value="Get Started" class="button is-primary">
|
||||||
|
<br><br>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
</div>
|
||||||
<input type="submit" value="Get Started" class="button is-primary">
|
|
||||||
<br><br>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -8,7 +8,7 @@ img{
|
|||||||
.onboarding{
|
.onboarding{
|
||||||
padding-left: 5%;
|
padding-left: 5%;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
font-size: 1.5em;
|
font-size: 1.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon{
|
.icon{
|
||||||
|
@ -52,7 +52,7 @@ document.getElementById('onboardingForm').onsubmit = function(e){
|
|||||||
submitInfo.networkContrib = getCheckValue('networkContribution')
|
submitInfo.networkContrib = getCheckValue('networkContribution')
|
||||||
submitInfo.plainContrib = getCheckValue('networkContributionPlain')
|
submitInfo.plainContrib = getCheckValue('networkContributionPlain')
|
||||||
submitInfo.donate = getCheckValue('donate')
|
submitInfo.donate = getCheckValue('donate')
|
||||||
submitInfo.deterministic = getCheckValue('useDeterministic')
|
//submitInfo.deterministic = getCheckValue('useDeterministic')
|
||||||
submitInfo.mail = getCheckValue('useMail')
|
submitInfo.mail = getCheckValue('useMail')
|
||||||
submitInfo.circles = getCheckValue('useCircles')
|
submitInfo.circles = getCheckValue('useCircles')
|
||||||
submitInfo.useDark = getCheckValue('useDarkTheme')
|
submitInfo.useDark = getCheckValue('useDarkTheme')
|
||||||
|
@ -1 +1 @@
|
|||||||
1580689731
|
1580770843
|
Loading…
Reference in New Issue
Block a user