xbr._gui¶
Attributes¶
Classes¶
Main XBR member application. |
|
WAMP application session for Twisted-based applications. |
|
Main application window which provides UI for the following functions: |
Functions¶
Module Contents¶
- class Application[source]¶
Bases:
objectMain XBR member application.
- async start(reactor, url=None, realm=None, profile=None)[source]¶
Start main application. This will read the user configuration, potentially asking for a user password.
- Parameters:
reactor – Twisted reactor to use.
url – Optionally override network URL as defined in profile.
realm – Optionally override network URL as defined in profile.
profile – User profile name to load.
- Returns:
- class ApplicationClient(config=None)[source]¶
Bases:
xbr._cli.ClientWAMP application session for Twisted-based applications.
Implements:
- async onJoin(details)[source]¶
Implements
autobahn.wamp.interfaces.ISession.onJoin()
- class ApplicationWindow(reactor, session, config, config_path, profile, profile_name)[source]¶
Bases:
gi.repository.Gtk.AssistantMain application window which provides UI for the following functions:
New account
Recover account:
- R1) Backup cloud device in account enabled => download encrypted account data
from cloud backup device, requires email (and 2FA) verification and password
- R2) At least one device left in account and at hand => synchronize with existing device,
direct device-to-device encrypted account data transfer
- R3) Only cold storage recovery seed phrase left => account from seed-phrase full
recovery, including new email and 2FA verification.
See also: * https://python-gtk-3-tutorial.readthedocs.io/en/latest/ * https://twistedmatrix.com/documents/current/core/howto/choosing-reactor.html
- _setup_page1()[source]¶
Setup page shown when no config/profile could be found. Allows to select from:
new account
synchronize device
recover account
- _main()[source]¶
GUI entry point, parsing command line arguments and then starting the actual main GUI program with parsed parameters.
To use, run:
xbrnetwork-ui --profile default --url ws://localhost:8090/ws --realm xbrnetworkThis will load the user profile
"default"from the user configuration, but overriding any network URL and realm found therin.
- async main(reactor, url, realm, profile)[source]¶
Load the named user profile (or create a new one), overriding URL/realm, connect to a network node, and start the network member on-boarding.
If the user credentials are already for a member, fetch member information and display member page.
- Parameters:
reactor – Twisted reactor to use.
url – Override network URL from user profile with this value.
realm – Override network realm from user profile with this value.
profile – Name of user profile within user configuration to load (eg from
$HOME/.xbrnetwork/config.ini)