Clean up UI
This commit is contained in:
parent
2ed2b82e02
commit
072703c8b2
1 changed files with 39 additions and 29 deletions
|
@ -1916,44 +1916,54 @@ impl AcpThreadView {
|
||||||
cx: &Context<Self>,
|
cx: &Context<Self>,
|
||||||
) -> Div {
|
) -> Div {
|
||||||
v_flex()
|
v_flex()
|
||||||
.p_2()
|
.py_2()
|
||||||
.gap_2()
|
.px_8()
|
||||||
|
.w_full()
|
||||||
.flex_1()
|
.flex_1()
|
||||||
.items_center()
|
.items_center()
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.child(
|
.child(
|
||||||
v_flex()
|
v_flex()
|
||||||
.items_center()
|
.w_full()
|
||||||
|
.max_w(px(530.))
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.child(self.render_error_agent_logo())
|
.gap_2()
|
||||||
.child(
|
.child(
|
||||||
h_flex().mt_4().mb_1().justify_center().child(
|
v_flex()
|
||||||
Headline::new("Authentication Required").size(HeadlineSize::Medium),
|
.justify_center()
|
||||||
),
|
.items_center()
|
||||||
|
.child(self.render_error_agent_logo())
|
||||||
|
.child(h_flex().mt_4().mb_1().justify_center().child(
|
||||||
|
Headline::new("Authentication Required").size(HeadlineSize::Medium),
|
||||||
|
))
|
||||||
|
.into_any(),
|
||||||
)
|
)
|
||||||
.into_any(),
|
.children(description.map(|desc| {
|
||||||
)
|
div().text_ui(cx).text_center().child(self.render_markdown(
|
||||||
.children(description.map(|desc| {
|
desc.clone(),
|
||||||
div().text_ui(cx).text_center().child(
|
default_markdown_style(false, window, cx),
|
||||||
self.render_markdown(desc.clone(), default_markdown_style(false, window, cx)),
|
))
|
||||||
)
|
}))
|
||||||
}))
|
.children(
|
||||||
.children(
|
configuration_view
|
||||||
configuration_view
|
.cloned()
|
||||||
.cloned()
|
.map(|view| div().w_full().child(view)),
|
||||||
.map(|view| div().px_4().w_full().max_w_128().child(view)),
|
)
|
||||||
)
|
.child(h_flex().mt_1p5().justify_center().children(
|
||||||
.child(h_flex().mt_1p5().justify_center().children(
|
connection.auth_methods().into_iter().map(|method| {
|
||||||
connection.auth_methods().into_iter().map(|method| {
|
Button::new(
|
||||||
Button::new(SharedString::from(method.id.0.clone()), method.name.clone())
|
SharedString::from(method.id.0.clone()),
|
||||||
.on_click({
|
method.name.clone(),
|
||||||
let method_id = method.id.clone();
|
)
|
||||||
cx.listener(move |this, _, window, cx| {
|
.on_click({
|
||||||
this.authenticate(method_id.clone(), window, cx)
|
let method_id = method.id.clone();
|
||||||
|
cx.listener(move |this, _, window, cx| {
|
||||||
|
this.authenticate(method_id.clone(), window, cx)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}),
|
||||||
}),
|
)),
|
||||||
))
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_server_exited(&self, status: ExitStatus, _cx: &Context<Self>) -> AnyElement {
|
fn render_server_exited(&self, status: ExitStatus, _cx: &Context<Self>) -> AnyElement {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue