mirror of
https://github.com/dw-0/kiauh.git
synced 2026-02-02 23:47:46 +05:00
Compare commits
2 Commits
657d919378
...
8ba134f574
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ba134f574 | ||
|
|
f951936b20 |
@@ -236,9 +236,11 @@ class KlipperSelectMcuConnectionMenu(BaseMenu):
|
||||
if len(self.flash_options.mcu_list) < 1:
|
||||
Logger.print_warn("No MCUs found!")
|
||||
Logger.print_warn("Make sure they are connected and repeat this step.")
|
||||
time.sleep(3)
|
||||
return
|
||||
|
||||
# if standalone is True, we only display the MCUs to the user and return
|
||||
if self.__standalone and len(self.flash_options.mcu_list) > 0:
|
||||
if self.__standalone:
|
||||
Logger.print_ok("The following MCUs were found:", prefix=False)
|
||||
for i, mcu in enumerate(self.flash_options.mcu_list):
|
||||
print(f" ● MCU #{i}: {Color.CYAN}{mcu}{Color.RST}")
|
||||
|
||||
@@ -152,7 +152,7 @@ def symlink_webui_nginx_log(
|
||||
def get_local_client_version(client: BaseWebClient) -> str | None:
|
||||
relinfo_file = client.client_dir.joinpath("release_info.json")
|
||||
version_file = client.client_dir.joinpath(".version")
|
||||
default = "n/a"
|
||||
default = "-"
|
||||
|
||||
if not client.client_dir.exists():
|
||||
return default
|
||||
|
||||
@@ -257,14 +257,14 @@ class UpdateMenu(BaseMenu):
|
||||
|
||||
def _format_local_status(self, local_version, remote_version) -> str:
|
||||
color = Color.RED
|
||||
if not local_version:
|
||||
if not local_version or local_version == '-':
|
||||
color = Color.RED
|
||||
elif local_version == remote_version:
|
||||
color = Color.GREEN
|
||||
elif local_version != remote_version:
|
||||
color = Color.YELLOW
|
||||
|
||||
return Color.apply(local_version or "-", color)
|
||||
return str(Color.apply(local_version or '-', color))
|
||||
|
||||
def _set_status_data(self, name: str, status_fn: Callable, *args) -> None:
|
||||
comp_status: ComponentStatus = status_fn(*args)
|
||||
|
||||
Reference in New Issue
Block a user