feat: remove extra btns in the toolbar
This commit is contained in:
@@ -141,27 +141,6 @@ impl PullRequestView {
|
|||||||
cx.notify();
|
cx.notify();
|
||||||
})),
|
})),
|
||||||
)
|
)
|
||||||
.child(div().flex_1())
|
|
||||||
.child(
|
|
||||||
toolbar_button("pr-close-btn")
|
|
||||||
.leading(font_icon(FontIcon::PullRequestClosed))
|
|
||||||
.mr_1(),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
toolbar_button("pr-merge-btn")
|
|
||||||
.variant(button::Variant::Primary)
|
|
||||||
.leading(font_icon(FontIcon::GitMerge))
|
|
||||||
.rounded_r_none(),
|
|
||||||
)
|
|
||||||
.child(divider())
|
|
||||||
.child(
|
|
||||||
toolbar_button("chevron")
|
|
||||||
.py_1()
|
|
||||||
.px_0p5()
|
|
||||||
.variant(button::Variant::Primary)
|
|
||||||
.leading(font_icon(FontIcon::ChevronDown))
|
|
||||||
.rounded_l_none(),
|
|
||||||
)
|
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,7 +333,8 @@ impl gpui::Render for PullRequestView {
|
|||||||
.flex_col()
|
.flex_col()
|
||||||
.child(self.toolbar(cx))
|
.child(self.toolbar(cx))
|
||||||
.child(match &self.pull_request_query {
|
.child(match &self.pull_request_query {
|
||||||
| Some(q) => match read_query(q, cx) {
|
| Some(q) => {
|
||||||
|
match read_query(q, cx) {
|
||||||
| QueryStatus::Loaded(pr) => match (&self.diff_view, self.current_tab) {
|
| QueryStatus::Loaded(pr) => match (&self.diff_view, self.current_tab) {
|
||||||
| (Some(diff_view), Tab::DiffView) => diff_view.clone().into_any_element(),
|
| (Some(diff_view), Tab::DiffView) => diff_view.clone().into_any_element(),
|
||||||
| _ => self.pr_content(pr, cx),
|
| _ => self.pr_content(pr, cx),
|
||||||
@@ -368,7 +348,8 @@ impl gpui::Render for PullRequestView {
|
|||||||
.size_full()
|
.size_full()
|
||||||
.child("loading pr content")
|
.child("loading pr content")
|
||||||
.into_any_element(),
|
.into_any_element(),
|
||||||
},
|
}
|
||||||
|
}
|
||||||
|
|
||||||
| None => div().size_full().child("no pr selected").into_any_element(),
|
| None => div().size_full().child("no pr selected").into_any_element(),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user