From d79237861fc73435b783cdc4552459c0fa64df7e Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 1 Feb 2026 06:52:59 +0000 Subject: [PATCH] Initial upload: DevDash CLI with TUI dashboard --- src/ui/components/cards.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/ui/components/cards.py diff --git a/src/ui/components/cards.py b/src/ui/components/cards.py new file mode 100644 index 0000000..c5b200f --- /dev/null +++ b/src/ui/components/cards.py @@ -0,0 +1,29 @@ +from textual.widgets import Static, Label +from textual.containers import Container +from typing import List, Optional + + +class PullRequestCard(Container): + def __init__( + self, + title: str, + author: str, + number: int, + draft: bool = False, + labels: List[str] = None, + **kwargs + ): + super().__init__(**kwargs) + self.title = title + self.author = author + self.number = number + self.draft = draft + self.labels = labels or [] + + def compose(self) -> ComposeResult: + yield Label(f"PR #{self.number}: {self.title}", classes="pr-title") + yield Static(f"by {self.author}", classes="pr-author") + if self.labels: + yield Static(f"Labels: {', '.join(self.labels)}", classes="pr-labels") + if self.draft: + yield Static("[DRAFT]", classes="draft-badge")