Compare commits

..

1 Commits

Author SHA1 Message Date
skarasov
daeba8fd28 Merge 6a766f7882 into d9626adc98 2024-11-30 06:39:12 -07:00
2 changed files with 5 additions and 3 deletions

View File

@@ -21,7 +21,9 @@ from core.menus import Option
from core.menus.base_menu import BaseMenu from core.menus.base_menu import BaseMenu
from core.settings.kiauh_settings import KiauhSettings, RepoSettings from core.settings.kiauh_settings import KiauhSettings, RepoSettings
from core.types.color import Color from core.types.color import Color
from core.types.component_status import ComponentStatus
from procedures.switch_repo import run_switch_repo_routine from procedures.switch_repo import run_switch_repo_routine
from utils.git_utils import get_repo_name
from utils.input_utils import get_confirm, get_string_input from utils.input_utils import get_confirm, get_string_input
@@ -139,12 +141,12 @@ class SettingsMenu(BaseMenu):
repo = get_string_input( repo = get_string_input(
"Enter new repository URL", "Enter new repository URL",
regex=r"^[\w/.:-]+$", regex="^[\w/.:-]+$",
default=KLIPPER_REPO_URL if repo_name == "klipper" else MOONRAKER_REPO_URL, default=KLIPPER_REPO_URL if repo_name == "klipper" else MOONRAKER_REPO_URL,
) )
branch = get_string_input( branch = get_string_input(
"Enter new branch name", "Enter new branch name",
regex=r"^.+$", regex="^.+$",
default="master" default="master"
) )

View File

@@ -51,7 +51,7 @@ def change_system_hostname() -> None:
) )
hostname = get_string_input( hostname = get_string_input(
"Enter the new hostname", "Enter the new hostname",
regex=r"^[a-z0-9]+([a-z0-9-]*[a-z0-9])?$", regex="^[a-z0-9]+([a-z0-9-]*[a-z0-9])?$",
) )
if not get_confirm(f"Change the hostname to '{hostname}'?", default_choice=False): if not get_confirm(f"Change the hostname to '{hostname}'?", default_choice=False):
Logger.print_info("Aborting hostname change ...") Logger.print_info("Aborting hostname change ...")