mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 19:44:29 +05:00
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:
@@ -13,15 +13,15 @@ from components.webui_client.base_data import BaseWebClient
|
|||||||
from core.logger import DialogType, Logger
|
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(
|
Logger.print_dialog(
|
||||||
DialogType.WARNING,
|
DialogType.WARNING,
|
||||||
[
|
[
|
||||||
"No local Moonraker installation was found!",
|
"No local Moonraker installation was found!",
|
||||||
"\n\n",
|
"\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 "
|
"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.",
|
"correctly.",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ def install_client(client: BaseWebClient) -> None:
|
|||||||
|
|
||||||
enable_remotemode = False
|
enable_remotemode = False
|
||||||
if not mr_instances:
|
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?"):
|
if not get_confirm(f"Continue {client.display_name} installation?"):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user