From ebb0949d4d37c472b36ca51698c5a4e056695b46 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 1 Feb 2026 06:53:01 +0000 Subject: [PATCH] Initial upload: DevDash CLI with TUI dashboard --- src/ui/components/loading.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/ui/components/loading.py diff --git a/src/ui/components/loading.py b/src/ui/components/loading.py new file mode 100644 index 0000000..574e11f --- /dev/null +++ b/src/ui/components/loading.py @@ -0,0 +1,19 @@ +from textual.widgets import Static + + +class LoadingSpinner(Static): + def __init__(self, **kwargs): + super().__init__("Loading...", **kwargs) + self._spinner_chars = "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏⠫⠽⠘⠰ ⠁⠂⠄⡀⢀⠠⠐⠈" + self._index = 0 + + async def on_mount(self) -> None: + self.update_timer = self.set_interval(0.1, self._spin) + + def _spin(self) -> None: + self._index = (self._index + 1) % len(self._spinner_chars) + self.update(self._spinner_chars[self._index]) + + def on_unmount(self) -> None: + if hasattr(self, 'update_timer'): + self.update_timer.stop()