feat: impl dashboard & issue list
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use gpui::{ParentElement, Styled, TitlebarOptions, div};
|
||||
|
||||
use crate::component::button::button;
|
||||
use crate::query::{self, QueryStatus, read_query, use_query};
|
||||
use crate::query::{self, QueryStatus, read_query, use_lazy_query, use_query};
|
||||
use crate::{
|
||||
api, app,
|
||||
component::{
|
||||
@@ -18,7 +18,7 @@ pub struct RepoSelector {}
|
||||
|
||||
pub fn new(cx: &mut gpui::Context<TitleBar>) -> TitleBar {
|
||||
TitleBar {
|
||||
fetch_user_query: use_query(api::user::Fetch, cx),
|
||||
fetch_user_query: use_lazy_query(api::user::Fetch, cx),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ impl gpui::Render for TitleBar {
|
||||
.bg(g.current_theme.colors.background)
|
||||
.text_color(g.current_theme.colors.text)
|
||||
.relative()
|
||||
.border_b_1()
|
||||
.border_color(g.current_theme.colors.border)
|
||||
.child(repo_selector(cx))
|
||||
.child(user_avatar)
|
||||
}
|
||||
@@ -60,9 +62,6 @@ impl gpui::Render for TitleBar {
|
||||
|
||||
impl RepoSelector {
|
||||
pub fn new(cx: &mut gpui::Context<Self>) -> Self {
|
||||
use_query(api::repo::List, cx);
|
||||
use_query(api::user::Fetch, cx);
|
||||
|
||||
Self {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user