Added better I2P status to connectivity status dialog. Restructured Connectivity page to work around KivyMD rendering bug.
This commit is contained in:
parent
2765185830
commit
a1091aa30f
|
@ -1,4 +1,5 @@
|
||||||
__debug_build__ = False
|
# TODO: Reset
|
||||||
|
__debug_build__ = True
|
||||||
__disable_shaders__ = True
|
__disable_shaders__ = True
|
||||||
__version__ = "0.3.0"
|
__version__ = "0.3.0"
|
||||||
__variant__ = "beta"
|
__variant__ = "beta"
|
||||||
|
@ -1094,9 +1095,9 @@ class SidebandApp(MDApp):
|
||||||
self.widget_hide(self.root.ids.connectivity_modem_label)
|
self.widget_hide(self.root.ids.connectivity_modem_label)
|
||||||
self.widget_hide(self.root.ids.connectivity_use_modem)
|
self.widget_hide(self.root.ids.connectivity_use_modem)
|
||||||
self.widget_hide(self.root.ids.connectivity_modem_fields)
|
self.widget_hide(self.root.ids.connectivity_modem_fields)
|
||||||
self.widget_hide(self.root.ids.connectivity_bluetooth_label)
|
# self.widget_hide(self.root.ids.connectivity_bluetooth_label)
|
||||||
self.widget_hide(self.root.ids.connectivity_use_bluetooth)
|
# self.widget_hide(self.root.ids.connectivity_use_bluetooth)
|
||||||
self.widget_hide(self.root.ids.connectivity_bluetooth_fields)
|
# self.widget_hide(self.root.ids.connectivity_bluetooth_fields)
|
||||||
self.widget_hide(self.root.ids.connectivity_transport_label)
|
self.widget_hide(self.root.ids.connectivity_transport_label)
|
||||||
self.widget_hide(self.root.ids.connectivity_enable_transport)
|
self.widget_hide(self.root.ids.connectivity_enable_transport)
|
||||||
self.widget_hide(self.root.ids.connectivity_serial_label)
|
self.widget_hide(self.root.ids.connectivity_serial_label)
|
||||||
|
@ -1104,28 +1105,36 @@ class SidebandApp(MDApp):
|
||||||
self.widget_hide(self.root.ids.connectivity_serial_fields)
|
self.widget_hide(self.root.ids.connectivity_serial_fields)
|
||||||
|
|
||||||
def con_collapse_local(collapse=True):
|
def con_collapse_local(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_local_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_local_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def con_collapse_tcp(collapse=True):
|
def con_collapse_tcp(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_tcp_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_tcp_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def con_collapse_i2p(collapse=True):
|
def con_collapse_i2p(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_i2p_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_i2p_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def con_collapse_bluetooth(collapse=True):
|
def con_collapse_bluetooth(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_bluetooth_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_bluetooth_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def con_collapse_rnode(collapse=True):
|
def con_collapse_rnode(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_rnode_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_rnode_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def con_collapse_modem(collapse=True):
|
def con_collapse_modem(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_modem_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_modem_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def con_collapse_serial(collapse=True):
|
def con_collapse_serial(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_serial_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_serial_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def con_collapse_transport(collapse=True):
|
def con_collapse_transport(collapse=True):
|
||||||
self.widget_hide(self.root.ids.connectivity_transport_fields, collapse)
|
# self.widget_hide(self.root.ids.connectivity_transport_fields, collapse)
|
||||||
|
pass
|
||||||
|
|
||||||
def save_connectivity(sender=None, event=None):
|
def save_connectivity(sender=None, event=None):
|
||||||
self.sideband.config["connect_transport"] = self.root.ids.connectivity_enable_transport.active
|
self.sideband.config["connect_transport"] = self.root.ids.connectivity_enable_transport.active
|
||||||
|
@ -1165,11 +1174,12 @@ class SidebandApp(MDApp):
|
||||||
con_collapse_tcp(collapse=not self.root.ids.connectivity_use_tcp.active)
|
con_collapse_tcp(collapse=not self.root.ids.connectivity_use_tcp.active)
|
||||||
con_collapse_i2p(collapse=not self.root.ids.connectivity_use_i2p.active)
|
con_collapse_i2p(collapse=not self.root.ids.connectivity_use_i2p.active)
|
||||||
con_collapse_rnode(collapse=not self.root.ids.connectivity_use_rnode.active)
|
con_collapse_rnode(collapse=not self.root.ids.connectivity_use_rnode.active)
|
||||||
con_collapse_bluetooth(collapse=not self.root.ids.connectivity_use_bluetooth.active)
|
|
||||||
con_collapse_modem(collapse=not self.root.ids.connectivity_use_modem.active)
|
con_collapse_modem(collapse=not self.root.ids.connectivity_use_modem.active)
|
||||||
con_collapse_serial(collapse=not self.root.ids.connectivity_use_serial.active)
|
con_collapse_serial(collapse=not self.root.ids.connectivity_use_serial.active)
|
||||||
con_collapse_transport(collapse=not self.sideband.config["connect_transport"])
|
con_collapse_transport(collapse=not self.sideband.config["connect_transport"])
|
||||||
|
|
||||||
|
# con_collapse_bluetooth(collapse=not self.root.ids.connectivity_use_bluetooth.active)
|
||||||
|
|
||||||
self.sideband.save_configuration()
|
self.sideband.save_configuration()
|
||||||
|
|
||||||
if sender == self.root.ids.connectivity_enable_transport:
|
if sender == self.root.ids.connectivity_enable_transport:
|
||||||
|
@ -1274,8 +1284,8 @@ class SidebandApp(MDApp):
|
||||||
self.root.ids.connectivity_rnode_ifac_netname.text = self.sideband.config["connect_rnode_ifac_netname"]
|
self.root.ids.connectivity_rnode_ifac_netname.text = self.sideband.config["connect_rnode_ifac_netname"]
|
||||||
self.root.ids.connectivity_rnode_ifac_passphrase.text = self.sideband.config["connect_rnode_ifac_passphrase"]
|
self.root.ids.connectivity_rnode_ifac_passphrase.text = self.sideband.config["connect_rnode_ifac_passphrase"]
|
||||||
|
|
||||||
self.root.ids.connectivity_use_bluetooth.active = False
|
# self.root.ids.connectivity_use_bluetooth.active = False
|
||||||
con_collapse_bluetooth(collapse=not self.root.ids.connectivity_use_bluetooth.active)
|
# con_collapse_bluetooth(collapse=not self.root.ids.connectivity_use_bluetooth.active)
|
||||||
|
|
||||||
self.root.ids.connectivity_use_modem.active = self.sideband.config["connect_modem"]
|
self.root.ids.connectivity_use_modem.active = self.sideband.config["connect_modem"]
|
||||||
con_collapse_modem(collapse=not self.root.ids.connectivity_use_modem.active)
|
con_collapse_modem(collapse=not self.root.ids.connectivity_use_modem.active)
|
||||||
|
@ -1332,7 +1342,7 @@ class SidebandApp(MDApp):
|
||||||
self.root.ids.connectivity_modem_ifmode.bind(focus=ifmode_validate)
|
self.root.ids.connectivity_modem_ifmode.bind(focus=ifmode_validate)
|
||||||
self.root.ids.connectivity_serial_ifmode.bind(focus=ifmode_validate)
|
self.root.ids.connectivity_serial_ifmode.bind(focus=ifmode_validate)
|
||||||
|
|
||||||
self.root.ids.connectivity_use_bluetooth.bind(active=save_connectivity)
|
# self.root.ids.connectivity_use_bluetooth.bind(active=save_connectivity)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
info = ""
|
info = ""
|
||||||
|
@ -2243,7 +2253,7 @@ class SidebandApp(MDApp):
|
||||||
def guide_action(self, sender=None):
|
def guide_action(self, sender=None):
|
||||||
def link_exec(sender=None, event=None):
|
def link_exec(sender=None, event=None):
|
||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open("https://unsigned.io/sideband")
|
webbrowser.open("https://unsigned.io/donate")
|
||||||
|
|
||||||
guide_text1 = """
|
guide_text1 = """
|
||||||
[size=18dp][b]Introduction[/b][/size][size=5dp]\n \n[/size]Welcome to [i]Sideband[/i], an LXMF client for Android, Linux and macOS. With Sideband, you can communicate with other people or LXMF-compatible systems over Reticulum networks using LoRa, Packet Radio, WiFi, I2P, or anything else Reticulum supports.
|
[size=18dp][b]Introduction[/b][/size][size=5dp]\n \n[/size]Welcome to [i]Sideband[/i], an LXMF client for Android, Linux and macOS. With Sideband, you can communicate with other people or LXMF-compatible systems over Reticulum networks using LoRa, Packet Radio, WiFi, I2P, or anything else Reticulum supports.
|
||||||
|
@ -2284,7 +2294,7 @@ If you use Reticulum and LXMF on hardware that does not carry any identifiers ti
|
||||||
- Ctrl-G Show guide"""
|
- Ctrl-G Show guide"""
|
||||||
|
|
||||||
guide_text9 = """
|
guide_text9 = """
|
||||||
[size=18dp][b]Sow Seeds Of Freedom[/b][/size][size=5dp]\n \n[/size]It took me more than seven years to design and built the entire ecosystem of software and hardware that makes this possible. If this project is valuable to you, please go to [u][ref=link]https://unsigned.io/sideband[/ref][/u] to support the project with a donation. Every donation directly makes the entire Reticulum project possible.
|
[size=18dp][b]Sow Seeds Of Freedom[/b][/size][size=5dp]\n \n[/size]It took me more than seven years to design and built the entire ecosystem of software and hardware that makes this possible. If this project is valuable to you, please go to [u][ref=link]https://unsigned.io/donate[/ref][/u] to support the project with a donation. Every donation directly makes the entire Reticulum project possible.
|
||||||
|
|
||||||
Thank you very much for using Free Communications Systems.
|
Thank you very much for using Free Communications Systems.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
__debug_build__ = False
|
# TODO: Reset
|
||||||
|
__debug_build__ = True
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import RNS
|
import RNS
|
||||||
|
@ -256,10 +257,19 @@ class SidebandService():
|
||||||
stat += "[b]TCP[/b]\n{ts}\n\n".format(ts=ts)
|
stat += "[b]TCP[/b]\n{ts}\n\n".format(ts=ts)
|
||||||
|
|
||||||
if self.sideband.interface_i2p != None:
|
if self.sideband.interface_i2p != None:
|
||||||
if self.sideband.interface_i2p.online:
|
i2s = "Unknown"
|
||||||
i2s = "Connected"
|
if hasattr(self.sideband.interface_i2p, "i2p_tunnel_state") and self.sideband.interface_i2p.i2p_tunnel_state != None:
|
||||||
|
if self.sideband.interface_i2p.i2p_tunnel_state == RNS.Interfaces.I2PInterface.I2PInterfacePeer.TUNNEL_STATE_INIT:
|
||||||
|
i2s = "Tunnel Connecting"
|
||||||
|
elif self.sideband.interface_i2p.i2p_tunnel_state == RNS.Interfaces.I2PInterface.I2PInterfacePeer.TUNNEL_STATE_ACTIVE:
|
||||||
|
i2s = "Tunnel Active"
|
||||||
|
elif self.sideband.interface_i2p.i2p_tunnel_state == RNS.Interfaces.I2PInterface.I2PInterfacePeer.TUNNEL_STATE_STALE:
|
||||||
|
i2s = "Tunnel Unresponsive"
|
||||||
else:
|
else:
|
||||||
i2s = "Connecting to I2P"
|
if self.sideband.interface_i2p.online:
|
||||||
|
i2s = "Connected"
|
||||||
|
else:
|
||||||
|
i2s = "Connecting to I2P"
|
||||||
|
|
||||||
stat += "[b]I2P[/b]\n{i2s}\n\n".format(i2s=i2s)
|
stat += "[b]I2P[/b]\n{i2s}\n\n".format(i2s=i2s)
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ class SidebandCore():
|
||||||
self.config["connect_tcp_ifac_netname"] = ""
|
self.config["connect_tcp_ifac_netname"] = ""
|
||||||
self.config["connect_tcp_ifac_passphrase"] = ""
|
self.config["connect_tcp_ifac_passphrase"] = ""
|
||||||
self.config["connect_i2p"] = False
|
self.config["connect_i2p"] = False
|
||||||
self.config["connect_i2p_b32"] = "mrwqlsioq4hoo2lmeeud7dkfscnm7yxak7dmiyvsrnpfag3z5tsq.b32.i2p"
|
self.config["connect_i2p_b32"] = "pmlm3l5rpympihoy2o5ago43kluei2jjjzsalcuiuylbve3mwi2a.b32.i2p"
|
||||||
self.config["connect_i2p_ifac_netname"] = ""
|
self.config["connect_i2p_ifac_netname"] = ""
|
||||||
self.config["connect_i2p_ifac_passphrase"] = ""
|
self.config["connect_i2p_ifac_passphrase"] = ""
|
||||||
self.config["connect_rnode"] = False
|
self.config["connect_rnode"] = False
|
||||||
|
|
|
@ -222,7 +222,7 @@ MDNavigationLayout:
|
||||||
|
|
||||||
MDBoxLayout:
|
MDBoxLayout:
|
||||||
orientation: "vertical"
|
orientation: "vertical"
|
||||||
spacing: "8dp"
|
spacing: "10dp"
|
||||||
size_hint_y: None
|
size_hint_y: None
|
||||||
height: self.minimum_height
|
height: self.minimum_height
|
||||||
padding: [dp(28), dp(48), dp(28), dp(16)]
|
padding: [dp(28), dp(48), dp(28), dp(16)]
|
||||||
|
@ -488,37 +488,37 @@ MDNavigationLayout:
|
||||||
font_size: dp(24)
|
font_size: dp(24)
|
||||||
|
|
||||||
|
|
||||||
MDBoxLayout:
|
# MDBoxLayout:
|
||||||
orientation: "horizontal"
|
# orientation: "horizontal"
|
||||||
padding: [0,0,dp(24),0]
|
# padding: [0,0,dp(24),0]
|
||||||
size_hint_y: None
|
# size_hint_y: None
|
||||||
height: dp(24)
|
# height: dp(24)
|
||||||
|
|
||||||
MDLabel:
|
# MDLabel:
|
||||||
id: connectivity_bluetooth_label
|
# id: connectivity_bluetooth_label
|
||||||
text: "Connect via Bluetooth"
|
# text: "Connect via Bluetooth"
|
||||||
font_style: "H6"
|
# font_style: "H6"
|
||||||
disabled: True
|
# disabled: True
|
||||||
|
|
||||||
MDSwitch:
|
# MDSwitch:
|
||||||
id: connectivity_use_bluetooth
|
# id: connectivity_use_bluetooth
|
||||||
active: False
|
# active: False
|
||||||
pos_hint: {"center_y": 0.3}
|
# pos_hint: {"center_y": 0.3}
|
||||||
disabled: True
|
# disabled: True
|
||||||
|
|
||||||
MDBoxLayout:
|
# MDBoxLayout:
|
||||||
id: connectivity_bluetooth_fields
|
# id: connectivity_bluetooth_fields
|
||||||
orientation: "vertical"
|
# orientation: "vertical"
|
||||||
size_hint_y: None
|
# size_hint_y: None
|
||||||
height: self.minimum_height
|
# height: self.minimum_height
|
||||||
padding: [0, 0, 0, dp(32)]
|
# padding: [0, 0, 0, dp(32)]
|
||||||
|
|
||||||
MDTextField:
|
# MDTextField:
|
||||||
id: connectivity_bluetooth_cid
|
# id: connectivity_bluetooth_cid
|
||||||
hint_text: "Bluetooth Pairing ID"
|
# hint_text: "Bluetooth Pairing ID"
|
||||||
text: ""
|
# text: ""
|
||||||
font_size: dp(24)
|
# font_size: dp(24)
|
||||||
# disabled: True
|
# # disabled: True
|
||||||
|
|
||||||
MDBoxLayout:
|
MDBoxLayout:
|
||||||
orientation: "horizontal"
|
orientation: "horizontal"
|
||||||
|
@ -538,6 +538,14 @@ MDNavigationLayout:
|
||||||
pos_hint: {"center_y": 0.3}
|
pos_hint: {"center_y": 0.3}
|
||||||
# disabled: True
|
# disabled: True
|
||||||
|
|
||||||
|
MDLabel:
|
||||||
|
id: connectivity_transport_info
|
||||||
|
markup: True
|
||||||
|
text: "Enabling Reticulum Transport will allow this device to route traffic between all enabled interfaces.\\n\\nFor general usage, this option should not be enabled, but it can be useful in situations where you want to share connectivity from one device to many others. An example of this could be sharing connectivity from a radio interface to other people on your local WiFi network.\\n\\nWhen enabled, you will be able to configure the interface mode for all interfaces configured on this device. For more information on this topic, refer to the Reticulum Manual."
|
||||||
|
size_hint_y: None
|
||||||
|
text_size: self.width, None
|
||||||
|
height: self.texture_size[1]
|
||||||
|
|
||||||
MDBoxLayout:
|
MDBoxLayout:
|
||||||
id: connectivity_transport_fields
|
id: connectivity_transport_fields
|
||||||
orientation: "vertical"
|
orientation: "vertical"
|
||||||
|
|
Loading…
Reference in New Issue