Compare commits

...

4 Commits
0.0.9 ... 0.1.0

Author SHA1 Message Date
Mark Qvist
953c8c94c7 Fixed browser view on non node hosting instances. 2021-09-19 00:30:07 +02:00
Mark Qvist
0c94dfa482 Updated version 2021-09-19 00:27:19 +02:00
Mark Qvist
08f1d4cda7 Fixed node info view on non node hosting instances. 2021-09-19 00:25:13 +02:00
Mark Qvist
718e2ca859 Fixed None reference 2021-09-19 00:15:26 +02:00
3 changed files with 62 additions and 55 deletions

View File

@@ -1 +1 @@
__version__ = "0.0.9"
__version__ = "0.1.0"

View File

@@ -202,7 +202,7 @@ class Browser:
self.display_widget.set_attr_map({None: "body_text"})
self.browser_header = self.make_control_widget()
remote_display_string = self.app.directory.simplest_display_str(self.destination_hash)
if remote_display_string == RNS.prettyhexrep(self.loopback):
if self.loopback != None and remote_display_string == RNS.prettyhexrep(self.loopback):
remote_display_string = self.app.node.name
self.linebox.set_title(remote_display_string)

View File

@@ -700,7 +700,19 @@ class NodeInfo(urwid.WidgetWrap):
g = self.app.ui.glyphs
self.dialog_open = False
widget_style = ""
def show_peer_info(sender):
options = self.parent.left_pile.options(height_type="pack", height_amount=None)
self.parent.left_pile.contents[2] = (LocalPeer(self.app, self.parent), options)
if self.app.enable_node:
if self.app.node != None:
display_name = self.app.node.name
else:
display_name = None
if display_name == None:
display_name = ""
@@ -731,10 +743,6 @@ class NodeInfo(urwid.WidgetWrap):
options = self.parent.left_pile.options(height_type="pack", height_amount=None)
self.parent.left_pile.contents[2] = (overlay, options)
def show_peer_info(sender):
options = self.parent.left_pile.options(height_type="pack", height_amount=None)
self.parent.left_pile.contents[2] = (LocalPeer(self.app, self.parent), options)
def connect_query(sender):
self.parent.browser.retrieve_url(RNS.hexrep(self.app.node.destination.hash, delimit=False))
@@ -755,8 +763,6 @@ class NodeInfo(urwid.WidgetWrap):
announce_button = urwid.Button("Announce Now", on_press=announce_query)
connect_button = urwid.Button("Browse", on_press=connect_query)
widget_style = ""
if self.app.enable_node:
pile = urwid.Pile([
t_id,
e_name,
@@ -784,6 +790,7 @@ class NodeInfo(urwid.WidgetWrap):
urwid.WidgetWrap.__init__(self, urwid.AttrMap(urwid.LineBox(self.display_widget, title="Local Node Info"), widget_style))
def start(self):
if self.app.node != None:
self.t_last_announce.start()
self.t_active_links.start()