LBRY-Vault/electrum/gui/kivy/uix/ui_screens/network.kv
SomberNight b491a30dd9
kivy network dialog: update server and proxy properly
Previously "proxy" would only get updated when closing and reopening
the network dialog. "server" would only get updated after successful
connection establishment to specified server.
2018-12-21 16:59:43 +01:00

57 lines
2.5 KiB
Text

Popup:
id: nd
title: _('Network')
BoxLayout:
orientation: 'vertical'
ScrollView:
GridLayout:
id: scrollviewlayout
cols:1
size_hint: 1, None
height: self.minimum_height
padding: '10dp'
SettingsItem:
value: _("{} connections.").format(app.num_nodes) if app.num_nodes else _("Not connected")
title: _("Status") + ': ' + self.value
description: _("Connections with Electrum servers")
action: lambda x: None
CardSeparator
SettingsItem:
title: _("Server") + ': ' + app.server_host
description: _("Server used to query your history.")
action: lambda x: app.popup_dialog('server')
CardSeparator
SettingsItem:
title: _("Proxy") + ': ' + app.proxy_str
description: _('Proxy configuration')
action: lambda x: app.popup_dialog('proxy')
CardSeparator
SettingsItem:
title: _("Auto-connect") + ': ' + ('ON' if app.auto_connect else 'OFF')
description: _("Select your server automatically")
action: app.toggle_auto_connect
CardSeparator
SettingsItem:
title: _("One-server mode") + ': ' + ('ON' if app.oneserver else 'OFF')
description: _("Only connect to a single server")
action: app.toggle_oneserver
disabled: app.auto_connect and not app.oneserver
CardSeparator
SettingsItem:
value: "%d blocks" % app.num_blocks
title: _("Blockchain") + ': ' + self.value
description: _('Verified block headers')
action: lambda x: x
CardSeparator
SettingsItem:
title: _('Fork detected at block {}').format(app.blockchain_forkpoint) if app.num_chains>1 else _('No fork detected')
fork_description: (_('You are following branch') if app.auto_connect else _("Your server is on branch")) + ' ' + app.blockchain_name
description: self.fork_description if app.num_chains>1 else _('Connected nodes are on the same chain')
action: app.choose_blockchain_dialog
disabled: app.num_chains == 1