parent
ac958d4a2d
commit
64cea2f1f1
1 changed files with 23 additions and 20 deletions
|
@ -855,9 +855,11 @@ impl AssistantPanel {
|
||||||
if is_empty {
|
if is_empty {
|
||||||
Label::new(Thread::DEFAULT_SUMMARY.clone())
|
Label::new(Thread::DEFAULT_SUMMARY.clone())
|
||||||
.truncate()
|
.truncate()
|
||||||
|
.ml_2()
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
} else if summary.is_none() {
|
} else if summary.is_none() {
|
||||||
Label::new(LOADING_SUMMARY_PLACEHOLDER)
|
Label::new(LOADING_SUMMARY_PLACEHOLDER)
|
||||||
|
.ml_2()
|
||||||
.truncate()
|
.truncate()
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
} else {
|
} else {
|
||||||
|
@ -873,7 +875,7 @@ impl AssistantPanel {
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| SharedString::from(LOADING_SUMMARY_PLACEHOLDER));
|
.unwrap_or_else(|| SharedString::from(LOADING_SUMMARY_PLACEHOLDER));
|
||||||
|
|
||||||
Label::new(title).truncate().into_any_element()
|
Label::new(title).ml_2().truncate().into_any_element()
|
||||||
}
|
}
|
||||||
ActiveView::History => Label::new("History").truncate().into_any_element(),
|
ActiveView::History => Label::new("History").truncate().into_any_element(),
|
||||||
ActiveView::Configuration => Label::new("Settings").truncate().into_any_element(),
|
ActiveView::Configuration => Label::new("Settings").truncate().into_any_element(),
|
||||||
|
@ -910,6 +912,7 @@ impl AssistantPanel {
|
||||||
|
|
||||||
let go_back_button = match &self.active_view {
|
let go_back_button = match &self.active_view {
|
||||||
ActiveView::History | ActiveView::Configuration => Some(
|
ActiveView::History | ActiveView::Configuration => Some(
|
||||||
|
div().pl_1().child(
|
||||||
IconButton::new("go-back", IconName::ArrowLeft)
|
IconButton::new("go-back", IconName::ArrowLeft)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
.on_click(cx.listener(|this, _, window, cx| {
|
.on_click(cx.listener(|this, _, window, cx| {
|
||||||
|
@ -928,6 +931,7 @@ impl AssistantPanel {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -944,8 +948,7 @@ impl AssistantPanel {
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.w_full()
|
.w_full()
|
||||||
.pl_2()
|
.gap_1()
|
||||||
.gap_2()
|
|
||||||
.children(go_back_button)
|
.children(go_back_button)
|
||||||
.child(self.render_title_view(window, cx)),
|
.child(self.render_title_view(window, cx)),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue