Launch RNode flasher directly from utilities

This commit is contained in:
Mark Qvist 2025-01-02 11:25:34 +01:00
parent b80a42947b
commit 19e3364b7f
2 changed files with 9 additions and 1 deletions

View File

@ -3768,13 +3768,20 @@ class SidebandApp(MDApp):
def cb(dt):
self.repository_screen.ids.repository_enable_button.disabled = True
self.repository_screen.ids.repository_disable_button.disabled = False
if hasattr(self, "wants_flasher_launch") and self.wants_flasher_launch == True:
self.wants_flasher_launch = False
if self.rnode_flasher_url != None:
def lj():
webbrowser.open(self.rnode_flasher_url)
threading.Thread(target=lj, daemon=True).start()
Clock.schedule_once(cb, 0.1)
else:
self.repository_screen.ids.repository_enable_button.disabled = False
self.repository_screen.ids.repository_disable_button.disabled = True
info += "\n"
info += ""
self.repository_screen.ids.repository_info.text = info
def repository_start_action(self, sender=None):

View File

@ -64,6 +64,7 @@ class Utilities():
)
def dl_yes(s):
dialog.dismiss()
self.app.wants_flasher_launch = True
self.app.sideband.start_webshare()
def cb(dt):
self.app.repository_action()