From 9db4064a2639a0760b8192dc3ae599374bd37d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=95=D0=BC=D0=B5?= =?UTF-8?q?=D0=BB=D1=8C=D1=8F=D0=BD=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Thu, 10 Sep 2026 14:24:17 +0300 Subject: [PATCH] Dog loader: drop paw trail --- src/selectel_ml_tui/ui/app.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/selectel_ml_tui/ui/app.py b/src/selectel_ml_tui/ui/app.py index 94fdd5b..8e1863f 100644 --- a/src/selectel_ml_tui/ui/app.py +++ b/src/selectel_ml_tui/ui/app.py @@ -59,12 +59,11 @@ class DogLoader(Static): """Полноэкранный индикатор загрузки: анимация собачки из GIF. Рисуется truecolor half-block'ами (2 пикселя на знакоместо), фон - прозрачный — просвечивает затемнённый дашборд. Под собачкой бежит - дорожка из 🐾. Показывается на время обновления и блокирует ввод. + прозрачный — просвечивает затемнённый дашборд. Показывается на время + обновления и блокирует ввод. """ INTERVAL = dog_art.FRAME_MS / 1000 - PAW_SLOTS = 9 frame = reactive(0) @@ -101,20 +100,11 @@ class DogLoader(Static): self._frames = dog_art.decode_frames() return self._frames - def _paws(self, index: int, width: int) -> str: - cells = "".join( - "🐾 " if (i + index) % 2 == 0 else " " - for i in range(self.PAW_SLOTS) - ).rstrip() - pad = max(0, (width - len(cells)) // 2) - return " " * pad + cells - def render(self) -> Any: frames = self._get_frames() data = frames[self.frame % len(frames)] width, px_height = dog_art.WIDTH, dog_art.PX_HEIGHT palette = dog_art.PALETTE - theme = self.app.current_theme text = Text(justify="center", no_wrap=True) for y in range(0, px_height, 2): @@ -138,8 +128,6 @@ class DogLoader(Static): ) if y + 2 < px_height: text.append("\n") - text.append("\n\n") - text.append(self._paws(self.frame, width), style=str(theme.secondary)) return text @on(InputEvent)