From c2f6c295a86d82b8087a6d1bc65e829ff41bc427 Mon Sep 17 00:00:00 2001 From: Beluga737 Date: Sun, 15 Nov 2026 20:29:16 +0700 Subject: [PATCH] =?UTF-8?q?UI:=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=B4=D1=83=D0=B1=D0=BB=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=B2=D0=B8=D0=B6=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=D0=BC=D0=B8=20=D1=81=D0=B0?= =?UTF-8?q?=D0=B9=D0=B4=D0=B1=D0=B0=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XUI/app.py | 3 --- XUI/components/sidebar.py | 16 ---------------- XUI/views/models.py | 2 -- XUI/views/training.py | 6 ------ 4 files changed, 27 deletions(-) diff --git a/XUI/app.py b/XUI/app.py index a24d3d8..fc6e49e 100644 --- a/XUI/app.py +++ b/XUI/app.py @@ -86,7 +86,6 @@ class App(ctk.CTk): self.current_view_key = None self.switch_view("chat") - self.sidebar.update_status(self.app_state, self.engine.is_ready()) self._update_status_bar() self.after(50, self._drain_ui_queue) self.after(1000, self._tick) @@ -211,8 +210,6 @@ class App(ctk.CTk): def _tick(self): try: - if hasattr(self.sidebar, "update_status"): - self.sidebar.update_status(self.app_state, self.engine.is_ready()) self._update_status_bar() except Exception as e: try: diff --git a/XUI/components/sidebar.py b/XUI/components/sidebar.py index 2a03ad6..d423392 100644 --- a/XUI/components/sidebar.py +++ b/XUI/components/sidebar.py @@ -30,15 +30,6 @@ class Sidebar(ctk.CTkFrame): btn.pack(fill="x", padx=12, pady=4) self.buttons[key] = btn - self.status_frame = ctk.CTkFrame(self, fg_color="transparent") - self.status_frame.pack(side="bottom", fill="x", padx=12, pady=16) - - self.model_label = ctk.CTkLabel(self.status_frame, text="Модель: —", anchor="w", wraplength=210) - self.model_label.pack(fill="x") - - self.engine_label = ctk.CTkLabel(self.status_frame, text="Движок: проверка...", anchor="w") - self.engine_label.pack(fill="x", pady=(4, 0)) - def set_active(self, key: str): for k, btn in self.buttons.items(): try: @@ -49,10 +40,3 @@ class Sidebar(ctk.CTkFrame): except Exception: pass - def update_status(self, state, engine_ready: bool): - if state.model_loaded and state.current_model_name: - self.model_label.configure(text=f"Модель: {state.current_model_name}") - else: - self.model_label.configure(text="Модель: не загружена") - self.engine_label.configure(text=f"Движок: {'ОК' if engine_ready else 'НЕ НАЙДЕН'}") - diff --git a/XUI/views/models.py b/XUI/views/models.py index f907060..ab488e5 100644 --- a/XUI/views/models.py +++ b/XUI/views/models.py @@ -188,8 +188,6 @@ class ModelsView(ViewBase): def after_load(self): """Обновление UI после загрузки модели. Выполняется в главном потоке.""" - if self.app and self.app_state: - self.app.sidebar.update_status(self.app_state, self.engine.is_ready() if self.engine else False) self._loading = False self.status_label.configure(text="") self.scan() diff --git a/XUI/views/training.py b/XUI/views/training.py index 14cdbbf..47a8d67 100644 --- a/XUI/views/training.py +++ b/XUI/views/training.py @@ -403,8 +403,6 @@ class TrainingView(ViewBase): if not self.app_state.current_model_name: self.app_state.current_model_name = "in-memory (ui)" self.app_state.log(f"[TRAIN/UI] {info}") - if self.app and hasattr(self.app, "sidebar"): - self.app.sidebar.update_status(self.app_state, self.engine.is_ready()) if reset_graph: self.clear_graph() self.set_status("готово") @@ -623,8 +621,6 @@ class TrainingView(ViewBase): if not self.app_state.current_model_name: self.app_state.current_model_name = "in-memory (ui)" self.app_state.log(f"[TRAIN/UI] Этап завершён: {info}") - if self.app and hasattr(self.app, "sidebar"): - self.app.sidebar.update_status(self.app_state, self.engine.is_ready()) self._train_state = None self.set_busy(False) self.set_status("готово") @@ -658,8 +654,6 @@ class TrainingView(ViewBase): self.app_state.current_model_name = os.path.basename(path) self.app_state.model_loaded = True self.app_state.log(f"[TRAIN/UI] Модель сохранена: {path}") - if self.app and hasattr(self.app, "sidebar"): - self.app.sidebar.update_status(self.app_state, self.engine.is_ready()) self.set_status("модель сохранена") self.progress_label.configure(text=f"Сохранено: {path}") except Exception as e: