Remove unneeded wrapping element
This commit is contained in:
parent
636c12ec3f
commit
9c4e8699ba
1 changed files with 32 additions and 34 deletions
|
@ -1626,41 +1626,39 @@ impl CollabPanel {
|
||||||
fn render_signed_out(&mut self, cx: &mut ViewContext<Self>) -> Div {
|
fn render_signed_out(&mut self, cx: &mut ViewContext<Self>) -> Div {
|
||||||
let collab_blurb = "Work with your team in realtime with collaborative editing, voice, shared notes and more.";
|
let collab_blurb = "Work with your team in realtime with collaborative editing, voice, shared notes and more.";
|
||||||
|
|
||||||
v_stack().items_center().child(
|
v_stack()
|
||||||
v_stack()
|
.gap_6()
|
||||||
.gap_6()
|
.p_4()
|
||||||
.p_4()
|
.child(Label::new(collab_blurb))
|
||||||
.child(Label::new(collab_blurb))
|
.child(
|
||||||
.child(
|
v_stack()
|
||||||
v_stack()
|
.gap_2()
|
||||||
.gap_2()
|
.child(
|
||||||
.child(
|
Button::new("sign_in", "Sign in")
|
||||||
Button::new("sign_in", "Sign in")
|
.icon_color(Color::Muted)
|
||||||
.icon_color(Color::Muted)
|
.icon(Icon::Github)
|
||||||
.icon(Icon::Github)
|
.icon_position(IconPosition::Start)
|
||||||
.icon_position(IconPosition::Start)
|
.style(ButtonStyle::Filled)
|
||||||
.style(ButtonStyle::Filled)
|
.full_width()
|
||||||
.full_width()
|
.on_click(cx.listener(|this, _, cx| {
|
||||||
.on_click(cx.listener(|this, _, cx| {
|
let client = this.client.clone();
|
||||||
let client = this.client.clone();
|
cx.spawn(|_, mut cx| async move {
|
||||||
cx.spawn(|_, mut cx| async move {
|
client
|
||||||
client
|
.authenticate_and_connect(true, &cx)
|
||||||
.authenticate_and_connect(true, &cx)
|
.await
|
||||||
.await
|
.notify_async_err(&mut cx);
|
||||||
.notify_async_err(&mut cx);
|
})
|
||||||
})
|
.detach()
|
||||||
.detach()
|
})),
|
||||||
})),
|
)
|
||||||
)
|
.child(
|
||||||
.child(
|
div().flex().w_full().items_center().child(
|
||||||
div().flex().w_full().items_center().child(
|
Label::new("Sign in to enable collaboration.")
|
||||||
Label::new("Sign in to enable collaboration.")
|
.color(Color::Muted)
|
||||||
.color(Color::Muted)
|
.size(LabelSize::Small),
|
||||||
.size(LabelSize::Small),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_list_entry(&mut self, ix: usize, cx: &mut ViewContext<Self>) -> AnyElement {
|
fn render_list_entry(&mut self, ix: usize, cx: &mut ViewContext<Self>) -> AnyElement {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue