refactor(KlipperScreen): add proper warning message
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ from utils.git_utils import (
|
|||||||
get_remote_commit,
|
get_remote_commit,
|
||||||
)
|
)
|
||||||
from utils.input_utils import get_confirm
|
from utils.input_utils import get_confirm
|
||||||
from utils.logger import Logger
|
from utils.logger import Logger, DialogType
|
||||||
from utils.sys_utils import (
|
from utils.sys_utils import (
|
||||||
check_python_version,
|
check_python_version,
|
||||||
control_systemd_service,
|
control_systemd_service,
|
||||||
@@ -51,10 +51,16 @@ def install_klipperscreen() -> None:
|
|||||||
mr_im = InstanceManager(Moonraker)
|
mr_im = InstanceManager(Moonraker)
|
||||||
mr_instances = mr_im.instances
|
mr_instances = mr_im.instances
|
||||||
if not mr_instances:
|
if not mr_instances:
|
||||||
# TODO: add moonraker not found dialog
|
warn_msg = [
|
||||||
print("Moonraker not found!")
|
"Moonraker not found! KlipperScreen will not properly work "
|
||||||
|
"without a working Moonraker installation.",
|
||||||
|
"KlipperScreens update manager configuration for Moonraker "
|
||||||
|
"will not be added to any moonraker.conf.",
|
||||||
|
]
|
||||||
|
Logger.print_dialog(DialogType.WARNING, warn_msg)
|
||||||
if not get_confirm(
|
if not get_confirm(
|
||||||
"Continue KlipperScreen installation?",
|
"Continue KlipperScreen installation?",
|
||||||
|
default_choice=False,
|
||||||
allow_go_back=True,
|
allow_go_back=True,
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user