mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-26 01:03:35 +05:00
Compare commits
5 Commits
v6.0.0-alp
...
4978f22101
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4978f22101 | ||
|
|
8330f90b56 | ||
|
|
2a08e3eb15 | ||
|
|
a2a3e92b50 | ||
|
|
3852464ab7 |
@@ -27,7 +27,6 @@ from components.crowsnest import (
|
||||
)
|
||||
from components.klipper.klipper import Klipper
|
||||
from core.backup_manager.backup_manager import BackupManager
|
||||
from core.constants import CURRENT_USER
|
||||
from core.logger import DialogType, Logger
|
||||
from core.settings.kiauh_settings import KiauhSettings
|
||||
from core.types.component_status import ComponentStatus
|
||||
@@ -73,7 +72,7 @@ def install_crowsnest() -> None:
|
||||
Logger.print_info("Installer will prompt you for sudo password!")
|
||||
try:
|
||||
run(
|
||||
f"sudo make install BASE_USER={CURRENT_USER}",
|
||||
f"sudo make install",
|
||||
cwd=CROWSNEST_DIR,
|
||||
shell=True,
|
||||
check=True,
|
||||
|
||||
@@ -165,7 +165,7 @@ def start_flash_process(flash_options: FlashOptions) -> None:
|
||||
if rc != 0:
|
||||
raise Exception(f"Flashing failed with returncode: {rc}")
|
||||
else:
|
||||
Logger.print_ok("Flashing successfull!", start="\n", end="\n\n")
|
||||
Logger.print_ok("Flashing successful!", start="\n", end="\n\n")
|
||||
|
||||
except (Exception, CalledProcessError):
|
||||
Logger.print_error("Flashing failed!", start="\n")
|
||||
|
||||
@@ -144,7 +144,7 @@ def install_client(
|
||||
custom_color=Color.GREEN,
|
||||
center_content=True,
|
||||
content=[
|
||||
f"Open {client.display_name} now on: http://{get_ipv4_addr()}:{port}",
|
||||
f"Open {client.display_name} now on: http://{get_ipv4_addr()}{'' if port == 80 else f':{port}'}",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ from core.menus import Option
|
||||
from core.menus.base_menu import BaseMenu
|
||||
from core.settings.kiauh_settings import KiauhSettings, RepoSettings
|
||||
from core.types.color import Color
|
||||
from core.types.component_status import ComponentStatus
|
||||
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
|
||||
|
||||
|
||||
@@ -141,12 +139,12 @@ class SettingsMenu(BaseMenu):
|
||||
|
||||
repo = get_string_input(
|
||||
"Enter new repository URL",
|
||||
regex="^[\w/.:-]+$",
|
||||
regex=r"^[\w/.:-]+$",
|
||||
default=KLIPPER_REPO_URL if repo_name == "klipper" else MOONRAKER_REPO_URL,
|
||||
)
|
||||
branch = get_string_input(
|
||||
"Enter new branch name",
|
||||
regex="^.+$",
|
||||
regex=r"^.+$",
|
||||
default="master"
|
||||
)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def change_system_hostname() -> None:
|
||||
"http://<hostname>.local",
|
||||
"\n\n",
|
||||
"Example: If you set your hostname to 'my-printer', you can access an "
|
||||
"installed webinterface by tyoing 'http://my-printer.local' in the "
|
||||
"installed webinterface by typing 'http://my-printer.local' in the "
|
||||
"browser.",
|
||||
],
|
||||
custom_title="CHANGE SYSTEM HOSTNAME",
|
||||
@@ -51,7 +51,7 @@ def change_system_hostname() -> None:
|
||||
)
|
||||
hostname = get_string_input(
|
||||
"Enter the new hostname",
|
||||
regex="^[a-z0-9]+([a-z0-9-]*[a-z0-9])?$",
|
||||
regex=r"^[a-z0-9]+([a-z0-9-]*[a-z0-9])?$",
|
||||
)
|
||||
if not get_confirm(f"Change the hostname to '{hostname}'?", default_choice=False):
|
||||
Logger.print_info("Aborting hostname change ...")
|
||||
|
||||
@@ -105,7 +105,7 @@ function install_crowsnest(){
|
||||
pushd "${HOME}/crowsnest" &> /dev/null || exit 1
|
||||
title_msg "Installer will prompt you for sudo password!"
|
||||
status_msg "Launching crowsnest installer ..."
|
||||
if ! sudo make install BASE_USER=$USER; then
|
||||
if ! sudo make install; then
|
||||
error_msg "Something went wrong! Please try again..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user