aboutsummaryrefslogtreecommitdiff
path: root/app/ui/hub.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/ui/hub.py')
-rw-r--r--app/ui/hub.py26
1 files changed, 19 insertions, 7 deletions
diff --git a/app/ui/hub.py b/app/ui/hub.py
index d20b28e..c1f5dce 100644
--- a/app/ui/hub.py
+++ b/app/ui/hub.py
@@ -237,20 +237,32 @@ class _Hub:
back to the menu that launched it. A crash flashes and does the same.
"""
def screen():
- try:
- info.setup_screen(self.stdscr)
- except tui.WizardCancelled:
- pass
- except Exception as exc: # noqa: BLE001 - keep the hub alive
- tui.flash(self.stdscr, str(exc), "err")
+ self._run_setup(info)
return tui.Wizard.BACK
return screen
+ def _run_setup(self, info) -> None:
+ """Run one backend's setup wizard on this session (no stack frame)."""
+ try:
+ info.setup_screen(self.stdscr)
+ except tui.WizardCancelled:
+ pass
+ except Exception as exc: # noqa: BLE001 - keep the hub alive
+ tui.flash(self.stdscr, str(exc), "err")
+
def screen_install(self):
+ """Pick a backend to install and run its setup inline.
+
+ The setup is not pushed as a stack frame: when it finishes this
+ screen returns BACK, popping straight past the picker to the
+ Configure menu, whose status table re-detects the new install.
+ Esc on the picker still pops back one screen normally.
+ """
info = self._pick_backend(installed_only=False)
if info is None:
return tui.Wizard.BACK
- return self.screen_setup(info)
+ self._run_setup(info)
+ return tui.Wizard.BACK
def screen_uninstall(self):
"""Pick a backend, confirm, then uninstall it inside the task view.