Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove UI for invite link in prep for beta launch
Mikayla Maki88599add563e
diff --git a/crates/collab_ui/src/contacts_popover.rs b/crates/collab_ui/src/contacts_popover.rsindex 017950e6cc7..bb20cfac396 100644--- a/crates/collab_ui/src/contacts_popover.rs+++ b/crates/collab_ui/src/contacts_popover.rs@@ -1,8 +1,8 @@use crate::{contact_finder::ContactFinder, contact_list::ContactList, ToggleContactsMenu};use client::UserStore;use gpui::{- actions, elements::*, ClipboardItem, CursorStyle, Entity, ModelHandle, MouseButton,- MutableAppContext, RenderContext, View, ViewContext, ViewHandle,+ actions, elements::*, Entity, ModelHandle, MouseButton, MutableAppContext, RenderContext, View,+ ViewContext, ViewHandle,};use project::Project;use settings::Settings;@@ -98,61 +98,9 @@ impl View for ContactsPopover {Child::ContactFinder(child) => ChildView::new(child, cx),};- MouseEventHandler::<ContactsPopover>::new(0, cx, |_, cx| {+ MouseEventHandler::<ContactsPopover>::new(0, cx, |_, _| {Flex::column().with_child(child.flex(1., true).boxed())- .with_children(- self.user_store- .read(cx)- .invite_info()- .cloned()- .and_then(|info| {- enum InviteLink {}-- if info.count > 0 {- Some(- MouseEventHandler::<InviteLink>::new(0, cx, |state, cx| {- let style = theme- .contacts_popover- .invite_row- .style_for(state, false)- .clone();-- let copied =- cx.read_from_clipboard().map_or(false, |item| {- item.text().as_str() == info.url.as_ref()- });-- Label::new(- format!(- "{} invite link ({} left)",- if copied { "Copied" } else { "Copy" },- info.count- ),- style.label.clone(),- )- .aligned()- .left()- .constrained()- .with_height(theme.contacts_popover.invite_row_height)- .contained()- .with_style(style.container)- .boxed()- })- .with_cursor_style(CursorStyle::PointingHand)- .on_click(MouseButton::Left, move |_, cx| {- cx.write_to_clipboard(ClipboardItem::new(- info.url.to_string(),- ));- cx.notify();- })- .boxed(),- )- } else {- None- }- }),- ).contained().with_style(theme.contacts_popover.container).constrained()diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rsindex dcaf2a9c900..e316a130d6a 100644--- a/crates/theme/src/theme.rs+++ b/crates/theme/src/theme.rs@@ -121,8 +121,6 @@ pub struct ContactsPopover {pub container: ContainerStyle,pub height: f32,pub width: f32,- pub invite_row_height: f32,- pub invite_row: Interactive<ContainedLabel>,}#[derive(Deserialize, Default)]diff --git a/styles/src/styleTree/contactList.ts b/styles/src/styleTree/contactList.tsindex 65dd1c86549..8ff5d903d85 100644--- a/styles/src/styleTree/contactList.ts+++ b/styles/src/styleTree/contactList.ts@@ -42,7 +42,7 @@ export default function contactsPanel(colorScheme: ColorScheme) {return {background: background(layer),- padding: { top: 12, bottom: 0 },+ padding: { top: 12 },userQueryEditor: {background: background(layer, "on"),cornerRadius: 6,diff --git a/styles/src/styleTree/contactsPopover.ts b/styles/src/styleTree/contactsPopover.tsindex 9a299d20d68..0819421daa6 100644--- a/styles/src/styleTree/contactsPopover.ts+++ b/styles/src/styleTree/contactsPopover.ts@@ -7,23 +7,11 @@ export default function contactsPopover(colorScheme: ColorScheme) {return {background: background(layer),cornerRadius: 6,- padding: { top: 6 },+ padding: { top: 6, bottom: 6 },margin: { top: -6 },shadow: colorScheme.popoverShadow,border: border(layer),width: 300,height: 400,- inviteRowHeight: 28,- inviteRow: {- padding: {- left: sidePadding,- right: sidePadding,- },- border: border(layer, { top: true }),- text: text(layer, "sans", "variant", { size: "sm" }),- hover: {- text: text(layer, "sans", "hovered", { size: "sm" }),- },- },}}