mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-12-17 14:54:26 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
953c8c94c7 | ||
|
|
0c94dfa482 | ||
|
|
08f1d4cda7 | ||
|
|
718e2ca859 |
@@ -1 +1 @@
|
||||
__version__ = "0.0.9"
|
||||
__version__ = "0.1.0"
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user