refactor: add client name to Moonraker not found dialog (#574)

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Co-authored-by: dw-0 <th33xitus@gmail.com>
This commit is contained in:
Pedro Lamas
2024-10-14 16:18:10 +01:00
committed by GitHub
parent e7eae5a0d1
commit 406b64d1e5
2 changed files with 4 additions and 4 deletions

View File

@@ -13,15 +13,15 @@ from components.webui_client.base_data import BaseWebClient
from core.logger import DialogType, Logger
def print_moonraker_not_found_dialog() -> None:
def print_moonraker_not_found_dialog(name: str) -> None:
Logger.print_dialog(
DialogType.WARNING,
[
"No local Moonraker installation was found!",
"\n\n",
"It is possible to install Mainsail without a local Moonraker installation. "
f"It is possible to install {name} without a local Moonraker installation. "
"If you continue, you need to make sure, that Moonraker is installed on "
"another machine in your network. Otherwise Mainsail will NOT work "
f"another machine in your network. Otherwise {name} will NOT work "
"correctly.",
],
)

View File

@@ -67,7 +67,7 @@ def install_client(client: BaseWebClient) -> None:
enable_remotemode = False
if not mr_instances:
print_moonraker_not_found_dialog()
print_moonraker_not_found_dialog(client.display_name)
if not get_confirm(f"Continue {client.display_name} installation?"):
return