diff --git a/src/config/onboarding.py b/src/config/onboarding.py
index 7362317c..af9a4b72 100644
--- a/src/config/onboarding.py
+++ b/src/config/onboarding.py
@@ -4,11 +4,12 @@ Setup config from onboarding choices
"""
from pathlib import Path
from typing import Union
+from threading import Thread
+from time import sleep
-from filepaths import onboarding_mark_file
from onionrtypes import JSONSerializable
from onionrtypes import OnboardingConfig
-from onionrplugins import onionrevents
+
import config
"""
This program is free software: you can redistribute it and/or modify
@@ -69,4 +70,4 @@ def set_config_from_onboarding(config_settings: OnboardingConfig):
get(config_settings, 'plainContrib'))
config.set('onboarding.done', True, savefile=True)
- onionrevents.event("onboard", config_settings)
+
diff --git a/src/onionrusers/onionrusers.py b/src/onionrusers/onionrusers.py
index 70cd8299..67d8dbd9 100755
--- a/src/onionrusers/onionrusers.py
+++ b/src/onionrusers/onionrusers.py
@@ -16,18 +16,18 @@ import onionrcrypto
from onionrcrypto import getourkeypair
from etc.onionrvalues import DATABASE_LOCK_TIMEOUT
"""
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
"""
diff --git a/static-data/default-plugins/usernames/info.json b/static-data/default-plugins/usernames/info.json
index 981f422c..29dd8116 100755
--- a/static-data/default-plugins/usernames/info.json
+++ b/static-data/default-plugins/usernames/info.json
@@ -1,5 +1,5 @@
{
"name" : "usernames",
- "version" : "0.0.0",
+ "version" : "0.0.1",
"author" : "onionr"
}
diff --git a/static-data/default-plugins/usernames/main.py b/static-data/default-plugins/usernames/main.py
index 6ae4d97a..f43748e3 100755
--- a/static-data/default-plugins/usernames/main.py
+++ b/static-data/default-plugins/usernames/main.py
@@ -6,8 +6,13 @@ Preset Onionr usernames
import locale
locale.setlocale(locale.LC_ALL, '')
-from utils import identifyhome
+import os
+import sys
+sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
+import logger
from onionrusers import contactmanager
+from utils import identifyhome
+import config
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,13 +29,19 @@ along with this program. If not, see .
"""
plugin_name = 'usernames'
+PLUGIN_VERSION = '0.0.1'
-def on_onboard(api, data=None):
- username_file = identifyhome.identify_home() + f'plugins/{plugin_name}/usernames.dat'
+def on_init(api, data = None):
+ config.reload()
+ if config.get('onboarding.done', True):
+ return
+
+ username_file = identifyhome.identify_home() + 'plugins/usernames/usernames.dat'
with open(username_file, 'r') as usernames:
username_and_keys = usernames.readlines()
+ logger.info("Setting preset usernames", terminal=True)
for entry in username_and_keys:
username, key = entry.split(',')
username = username.strip()
@@ -40,5 +51,3 @@ def on_onboard(api, data=None):
user = contactmanager.ContactManager(key, saveUser=True)
user.set_info('name', username)
-
-
diff --git a/static-data/default-plugins/usernames/usernames.dat b/static-data/default-plugins/usernames/usernames.dat
index e591de2b..00248760 100644
--- a/static-data/default-plugins/usernames/usernames.dat
+++ b/static-data/default-plugins/usernames/usernames.dat
@@ -1 +1,3 @@
Kevin Froman,GM3E4VCUNLF5F7Y64STD2HEURG45U3NYPLBZBT3Z6YWOALJHZPPQ
+Supernova,OXDRJS7YC7GQCQX7AAAJWN7LFI34AB2BE4VBYGEEUWGB3TSDB5FQ
+Cartr,DWQ4CGQGUAVBTXZKFABS63W6KK4JSXK6HTEOXDATOADJNBE4C62A
\ No newline at end of file
diff --git a/static-data/www/onboarding/index.html b/static-data/www/onboarding/index.html
index b8eff383..371f8226 100644
--- a/static-data/www/onboarding/index.html
+++ b/static-data/www/onboarding/index.html
@@ -203,7 +203,7 @@