From 196df1c37889f3b220a41da4e5fd6f8024183b35 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 18 Dec 2023 11:33:37 -0500 Subject: [PATCH] Start on collab panel empty state --- crates/collab_ui2/src/collab_panel.rs | 41 ++++++++++++++++++--------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/crates/collab_ui2/src/collab_panel.rs b/crates/collab_ui2/src/collab_panel.rs index 5f01d49878..a845e117d5 100644 --- a/crates/collab_ui2/src/collab_panel.rs +++ b/crates/collab_ui2/src/collab_panel.rs @@ -2027,20 +2027,33 @@ impl CollabPanel { } fn render_signed_out(&mut self, cx: &mut ViewContext) -> Div { - v_stack().border_1().border_color(gpui::red()).child( - Button::new("sign_in", "Sign in to collaborate").on_click(cx.listener( - |this, _, cx| { - let client = this.client.clone(); - cx.spawn(|_, mut cx| async move { - client - .authenticate_and_connect(true, &cx) - .await - .notify_async_err(&mut cx); - }) - .detach() - }, - )), - ) + v_stack() + .justify_center() + .items_center() + .child(v_stack().gap_1().p_4() + .child( + Label::new("Work with your team with realtive collaborative editing, voice, shared notes and more.") + ) + .child( + Label::new("Sign in to enable collaboration.") + ) + .child( + Button::new("sign_in", "Sign in") + .style(ButtonStyle::Filled) + .full_width() + .on_click(cx.listener( + |this, _, cx| { + let client = this.client.clone(); + cx.spawn(|_, mut cx| async move { + client + .authenticate_and_connect(true, &cx) + .await + .notify_async_err(&mut cx); + }) + .detach() + }, + )), + )) } fn render_list_entry(&mut self, ix: usize, cx: &mut ViewContext) -> AnyElement {