From 7b677688522807f5f99d7f0fdd54c32da0f11940 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 1 Feb 2026 06:53:00 +0000 Subject: [PATCH] Initial upload: DevDash CLI with TUI dashboard --- src/ui/components/panels.py | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/ui/components/panels.py diff --git a/src/ui/components/panels.py b/src/ui/components/panels.py new file mode 100644 index 0000000..c8c4a7d --- /dev/null +++ b/src/ui/components/panels.py @@ -0,0 +1,51 @@ +from textual.containers import Container, Vertical +from textual.widgets import Static, Label +from typing import List, Dict, Any + + +class StatusPanel(Container): + def __init__(self, title: str = "", **kwargs): + super().__init__(**kwargs) + self.panel_title = title + + def compose(self) -> ComposeResult: + yield Label(f"[{self.panel_title}]", classes="panel-title") + + +class GitStatusPanel(StatusPanel): + def __init__(self, **kwargs): + super().__init__("Git Status", **kwargs) + + def update_status(self, status) -> None: + self.mount(Vertical( + Static(f"Branch: {status.branch}"), + Static(f"Commit: {status.commit[:7]}"), + Static(f"Staged: {status.staged}"), + Static(f"Unstaged: {status.unstaged}"), + Static(f"Untracked: {status.untracked}"), + id="git-status-content" + )) + + +class CIStatusPanel(StatusPanel): + def __init__(self, **kwargs): + super().__init__("CI/CD", **kwargs) + + def update_workflows(self, workflows: List[Dict[str, Any]]) -> None: + pass + + +class PullRequestsPanel(StatusPanel): + def __init__(self, **kwargs): + super().__init__("Pull Requests", **kwargs) + + def update_prs(self, prs: List[Dict[str, Any]]) -> None: + pass + + +class IssuesPanel(StatusPanel): + def __init__(self, **kwargs): + super().__init__("Issues", **kwargs) + + def update_issues(self, issues: List[Dict[str, Any]]) -> None: + pass