feat: impl dashboard & issue list

This commit is contained in:
2026-05-06 01:42:38 +08:00
parent bef3a0b9ed
commit 7de0039d38
36 changed files with 2381 additions and 107 deletions

View File

@@ -26,7 +26,20 @@ macro_rules! define_font_icons {
};
}
define_font_icons!(Check, ChevronDown, FolderGit, Github, ArrowRight, Cat);
define_font_icons!(
Check,
ChevronDown,
FolderGit,
Github,
ArrowRight,
Cat,
PencilLine,
UserPlus,
List,
PullRequestArrow,
PullRequestClosed,
PullRequestDraft
);
#[derive(gpui::IntoElement)]
pub struct FontIconSvg {

View File

@@ -8,6 +8,7 @@ pub(crate) struct Text {
opacity: f32,
text_align: gpui::TextAlign,
text_size: Option<gpui::AbsoluteLength>,
text_color: Option<gpui::Hsla>,
line_height: gpui::DefiniteLength,
styled: Option<Box<dyn Fn(gpui::Div) -> gpui::Div>>,
}
@@ -25,6 +26,7 @@ pub(crate) fn text(content: impl TextContent) -> Text {
opacity: 1.,
text_align: gpui::TextAlign::Left,
text_size: None,
text_color: None,
line_height: gpui::relative(1.5),
styled: None,
}
@@ -84,6 +86,11 @@ impl Text {
self.text_size(gpui::rems(1.875))
}
pub(crate) fn text_color(mut self, color: impl Into<gpui::Hsla>) -> Self {
self.text_color = Some(color.into());
self
}
pub(crate) fn line_height(mut self, line_height: impl Into<gpui::DefiniteLength>) -> Self {
self.line_height = line_height.into();
self
@@ -160,7 +167,7 @@ impl gpui::RenderOnce for Text {
fn render(self, _window: &mut gpui::Window, cx: &mut gpui::App) -> impl gpui::IntoElement {
let theme = app::current_theme(cx);
let mut div = div()
.text_color(theme.colors.text)
.text_color(self.text_color.unwrap_or(theme.colors.text.into()))
.font_weight(self.font_weight)
.opacity(self.opacity)
.text_align(self.text_align)